mirror of
https://github.com/git/git.git
synced 2025-04-11 09:16:34 +00: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:
parent
1f3b1efd18
commit
18814d0e2d
2
remote.c
2
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user