blame: fix segfault on untracked files
[gitweb.git] / credential-store.c
index 54c4e047373757598f6de7bf994251f0169b2b38..57141679abdaa804282a0cc2d808e7c6687d924a 100644 (file)
@@ -23,7 +23,7 @@ static int parse_credential_file(const char *fn,
                return found_credential;
        }
 
-       while (strbuf_getline(&line, fh, '\n') != EOF) {
+       while (strbuf_getline_lf(&line, fh) != EOF) {
                credential_from_url(&entry, line.buf);
                if (entry.username && entry.password &&
                    credential_match(c, &entry)) {