summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-28 13:27:33 -0700
committerJunio C Hamano <gitster@pobox.com>2016-01-14 15:10:53 -0800
commitec9d83d56c696b21f5450a2a6bbd181807767c20 (patch)
tree96be9268fbfdd9037563628bd0903cc3868ec0d7
parent2eb2c31d24cdbda40a7920df031bfaccb690e4f6 (diff)
downloadgit-ec9d83d56c696b21f5450a2a6bbd181807767c20.tar.gz
remote.c: read $GIT_DIR/remotes/* with strbuf_getline()
These files can be edited with a DOS editor, leaving CR at the end of the line if read with strbuf_getline(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index f19569385e..7d61dabebb 100644
--- a/remote.c
+++ b/remote.c
@@ -256,7 +256,7 @@ static void read_remotes_file(struct remote *remote)
if (!f)
return;
remote->origin = REMOTE_REMOTES;
- while (strbuf_getline_lf(&buf, f) != EOF) {
+ while (strbuf_getline(&buf, f) != EOF) {
const char *v;
strbuf_rtrim(&buf);