[PATCH v4 14/21] remote.c: read $GIT_DIR/remotes/* with strbuf_getline()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 14, 2016, 23:58 UTC
- Message-ID
- <1452815916-6447-15-git-send-email-gitster@pobox.com>
- In-Reply-To
- <1452815916-6447-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 <gitster@pobox.com> --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/remote.c b/remote.c index f195693..7d61dab 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);
-- 2.7.0-250-ge1b5ba3