aboutsummaryrefslogtreecommitdiff
path: root/convert.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-15 18:59:45 -0700
committerJunio C Hamano <gitster@pobox.com>2008-07-15 18:59:45 -0700
commit223bb84572c8b2058e175e8452913bcb1bdb0ade (patch)
treeec3704442ab81fdd9a1453878e0bd151dc019e62 /convert.c
parent1466080199c9e102515b8a0820d97eed86a8f678 (diff)
parentfdfd20080239c8564e40498bbaae63c1b87ccdba (diff)
downloadgit-223bb84572c8b2058e175e8452913bcb1bdb0ade.tar.xz
Merge branch 'sp/win'
* sp/win: We need to check for msys as well as Windows in add--interactive. Convert CR/LF to LF in tag signatures Fixed text file auto-detection: treat EOF character 032 at the end of file as printable
Diffstat (limited to 'convert.c')
-rw-r--r--convert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/convert.c b/convert.c
index 352b69d4ce..78efed800d 100644
--- 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--;
}
/*