diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-28 13:29:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-15 10:34:53 -0800 |
commit | 3f163962282d2d8bea914c32d81ad38544044f78 (patch) | |
tree | 4525c22cabc4d4265c4efc18f5768ae5b52ec731 /sha1_file.c | |
parent | 18814d0e2d7d5924a799bcf0cae3a0aaba569613 (diff) | |
download | git-3f163962282d2d8bea914c32d81ad38544044f78.tar.gz git-3f163962282d2d8bea914c32d81ad38544044f78.tar.xz |
clone/sha1_file: read info/alternates with strbuf_getline()
$GIT_OBJECT_DIRECTORY/info/alternates is a text file that can be
edited with a DOS editor. We do not want to use the real path with
CR appended at the end.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index 86b5e8cf7..aab1872b4 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; |