Merge branch 'jc/strbuf-getline'
The preliminary clean-up for jc/peace-with-crlf topic. * jc/strbuf-getline: strbuf: give strbuf_getline() to the "most text friendly" variant checkout-index: there are only two possible line terminations update-index: there are only two possible line terminations check-ignore: there are only two possible line terminations check-attr: there are only two possible line terminations mktree: there are only two possible line terminations strbuf: introduce strbuf_getline_{lf,nul}() strbuf: make strbuf_getline_crlf() global strbuf: miniscule style fix
This commit is contained in:
@ -385,7 +385,7 @@ static void get_merge_heads(struct sha1_array *merge_heads)
|
||||
|
||||
if (!(fp = fopen(filename, "r")))
|
||||
die_errno(_("could not open '%s' for reading"), filename);
|
||||
while (strbuf_getline(&sb, fp, '\n') != EOF) {
|
||||
while (strbuf_getline_lf(&sb, fp) != EOF) {
|
||||
if (get_sha1_hex(sb.buf, sha1))
|
||||
continue; /* invalid line: does not start with SHA1 */
|
||||
if (starts_with(sb.buf + GIT_SHA1_HEXSZ, "\tnot-for-merge\t"))
|
||||
|
Reference in New Issue
Block a user