projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9a3e82
)
Fixed text file auto-detection: treat EOF character 032 at the end of file as printable
author
Dmitry Kakurin
<Dmitry.Kakurin@gmail.com>
Fri, 11 Jul 2008 16:48:16 +0000
(18:48 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 12 Jul 2008 04:14:27 +0000
(21:14 -0700)
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>
convert.c
patch
|
blob
|
history
diff --git
a/convert.c
b/convert.c
index 352b69d4ceeec411a81469a6146e023aa1d6b338..78efed800d4d64898d438d9590b01be008cfcd36 100644
(file)
--- a/
convert.c
+++ b/
convert.c
@@
-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--;
}
/*