hash-object: read --stdin-paths with strbuf_getline()

The list of paths could have been written with a DOS editor.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2015-10-28 13:56:23 -07:00
Родитель 1a0c8dfd89
Коммит c0353c78e8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -60,7 +60,7 @@ static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
{
struct strbuf buf = STRBUF_INIT, nbuf = STRBUF_INIT;
while (strbuf_getline_lf(&buf, stdin) != EOF) {
while (strbuf_getline(&buf, stdin) != EOF) {
if (buf.buf[0] == '"') {
strbuf_reset(&nbuf);
if (unquote_c_style(&nbuf, buf.buf, NULL))