From: Junio C Hamano Date: Wed, 28 Oct 2015 22:25:54 GMT Subject: [PATCH 10/17] remote.c: read $GIT_DIR/remotes/* with strbuf_gets() Message-ID: <1446071161-15610-11-git-send-email-gitster@pobox.com> In-Reply-To: <1446071161-15610-1-git-send-email-gitster@pobox.com> 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 --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote.c b/remote.c index 1101f82..90eef22 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(&buf, f, '\n') != EOF) { + while (strbuf_gets(&buf, f) != EOF) { const char *v; strbuf_rtrim(&buf); -- 2.6.2-423-g5314b62