rebase: Support preserving merges in non-interactive mode
[gitweb.git] / 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--;
 }
 
 /*