summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-03 22:15:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-03 22:15:58 (GMT)
commit017565525f969c26c43443d998a1283cac843d10 (patch)
tree32d6e0cac811a30e9a709cfb4720310436efc762 /sha1_file.c
parent07c314d22dc8b0a982e76e7498a3f4d384062491 (diff)
parentf06068c96181f6212e15e32957a3d40c7c7bd43d (diff)
downloadgit-017565525f969c26c43443d998a1283cac843d10.zip
git-017565525f969c26c43443d998a1283cac843d10.tar.gz
git-017565525f969c26c43443d998a1283cac843d10.tar.bz2
Merge branch 'jc/peace-with-crlf'
Many commands that read files that are expected to contain text that is generated (or can be edited) by the end user to control their behaviour (e.g. "git grep -f <filename>") have been updated to be more tolerant to lines that are terminated with CRLF (they used to treat such a line to contain payload that ends with CR, which is usually not what the users expect). * jc/peace-with-crlf: test-sha1-array: read command stream with strbuf_getline() grep: read -f file with strbuf_getline() send-pack: read list of refs with strbuf_getline() column: read lines with strbuf_getline() cat-file: read batch stream with strbuf_getline() transport-helper: read helper response with strbuf_getline() clone/sha1_file: read info/alternates with strbuf_getline() remote.c: read $GIT_DIR/remotes/* with strbuf_getline() ident.c: read /etc/mailname with strbuf_getline() rev-parse: read parseopt spec with strbuf_getline() revision: read --stdin with strbuf_getline() hash-object: read --stdin-paths with strbuf_getline()
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 86b5e8c..aab1872 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -396,7 +396,7 @@ void add_to_alternates_file(const char *reference)
struct strbuf line = STRBUF_INIT;
int found = 0;
- while (strbuf_getline_lf(&line, in) != EOF) {
+ while (strbuf_getline(&line, in) != EOF) {
if (!strcmp(reference, line.buf)) {
found = 1;
break;