1
0
mirror of https://github.com/git/git.git synced 2024-09-28 08:49:45 +02:00

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>
This commit is contained in:
Junio C Hamano 2015-10-28 13:27:33 -07:00
parent 1f3b1efd18
commit 18814d0e2d

View File

@ -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);