]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remote.c: read $GIT_DIR/remotes/* with strbuf_getline()
authorJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2015 20:27:33 +0000 (13:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jan 2016 18:34:42 +0000 (10:34 -0800)
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

index f19569385e8d161c75ff45824fd282e1ee6a4c80..7d61dabebb3727e2e70cc282053d3138be5ead9d 100644 (file)
--- 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);