summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-29 00:10:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-29 00:10:14 (GMT)
commitb62624b51a54325e6884c197352dc0dcef700325 (patch)
tree2a5c68bae2133bbb762253f183abcc6f00f8faef /wt-status.c
parent116a866bf50da9b893623ebb940e1c6bff7a29bc (diff)
parent1a0c8dfd89475d6bb09ddee8c019cf0ae5b3bdc2 (diff)
downloadgit-b62624b51a54325e6884c197352dc0dcef700325.zip
git-b62624b51a54325e6884c197352dc0dcef700325.tar.gz
git-b62624b51a54325e6884c197352dc0dcef700325.tar.bz2
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
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c
index bba2596..ab4f80d 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -988,7 +988,7 @@ static char *read_line_from_git_path(const char *filename)
strbuf_release(&buf);
return NULL;
}
- strbuf_getline(&buf, fp, '\n');
+ strbuf_getline_lf(&buf, fp);
if (!fclose(fp)) {
return strbuf_detach(&buf, NULL);
} else {
@@ -1076,7 +1076,7 @@ static void read_rebase_todolist(const char *fname, struct string_list *lines)
if (!f)
die_errno("Could not open file %s for reading",
git_path("%s", fname));
- while (!strbuf_getline(&line, f, '\n')) {
+ while (!strbuf_getline_lf(&line, f)) {
if (line.len && line.buf[0] == comment_line_char)
continue;
strbuf_trim(&line);