Skip to content

Commit

Permalink
remote.c: read $GIT_DIR/remotes/* with strbuf_getline()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 15, 2016
1 parent 1f3b1ef commit 18814d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 18814d0

Please sign in to comment.