From: Junio C Hamano Date: Wed, 28 Oct 2015 20:27:33 +0000 (-0700) Subject: remote.c: read $GIT_DIR/remotes/* with strbuf_getline() X-Git-Tag: v2.8.0-rc0~85^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18814d0e2d7d5924a799bcf0cae3a0aaba569613;p=thirdparty%2Fgit.git 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 --- 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);