зеркало из https://github.com/microsoft/git.git
Fixed text file auto-detection: treat EOF character 032 at the end of file as printable
Signed-off-by: Dmitry Kakurin <Dmitry.Kakurin@gmail.com> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
a9a3e82e6d
Коммит
f9dd4bf4e5
|
@ -61,6 +61,10 @@ static void gather_stats(const char *buf, unsigned long size, struct text_stat *
|
|||
else
|
||||
stats->printable++;
|
||||
}
|
||||
|
||||
/* If file ends with EOF then don't count this EOF as non-printable. */
|
||||
if (size >= 1 && buf[size-1] == '\032')
|
||||
stats->nonprintable--;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче