strbuf: introduce strbuf_getline_{lf,nul}()
[git/git.git] / sha1_file.c
index 73ccd49..86b5e8c 100644 (file)
@@ -396,7 +396,7 @@ void add_to_alternates_file(const char *reference)
                struct strbuf line = STRBUF_INIT;
                int found = 0;
 
-               while (strbuf_getline(&line, in, '\n') != EOF) {
+               while (strbuf_getline_lf(&line, in) != EOF) {
                        if (!strcmp(reference, line.buf)) {
                                found = 1;
                                break;