diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-01-28 16:10:14 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-01-28 16:10:14 -0800 |
| commit | b62624b51a54325e6884c197352dc0dcef700325 (patch) | |
| tree | 2a5c68bae2133bbb762253f183abcc6f00f8faef /remote.c | |
| parent | Merge branch 'js/msys2' (diff) | |
| parent | strbuf: give strbuf_getline() to the "most text friendly" variant (diff) | |
| download | git-b62624b51a54325e6884c197352dc0dcef700325.tar.gz git-b62624b51a54325e6884c197352dc0dcef700325.zip | |
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 'remote.c')
| -rw-r--r-- | remote.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |
