summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-28 20:27:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-15 18:34:42 (GMT)
commit18814d0e2d7d5924a799bcf0cae3a0aaba569613 (patch)
treeca686da2117dd71fd9d0b548db76e3d27a701e4a /remote.c
parent1f3b1efd18a935fed41431132c67cde5a94833ae (diff)
downloadgit-18814d0e2d7d5924a799bcf0cae3a0aaba569613.zip
git-18814d0e2d7d5924a799bcf0cae3a0aaba569613.tar.gz
git-18814d0e2d7d5924a799bcf0cae3a0aaba569613.tar.bz2
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>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index f195693..7d61dab 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);