strbuf: introduce strbuf_getline_{lf,nul}()
[git/git.git] / remote.c
index 9d34b5a..f195693 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(&buf, f, '\n') != EOF) {
+       while (strbuf_getline_lf(&buf, f) != EOF) {
                const char *v;
 
                strbuf_rtrim(&buf);
@@ -281,7 +281,7 @@ static void read_branches_file(struct remote *remote)
        if (!f)
                return;
 
-       strbuf_getline(&buf, f, '\n');
+       strbuf_getline_lf(&buf, f);
        fclose(f);
        strbuf_trim(&buf);
        if (!buf.len) {