Add more header dependencies.
[git.git] / show-diff.c
index 0af2f10..36afb3c 100644 (file)
@@ -4,7 +4,6 @@
  * Copyright (C) Linus Torvalds, 2005
  */
 #include "cache.h"
-#include <ctype.h>
 
 static char *diff_cmd = "diff -L '%s' -u -N  - '%s'";
 
@@ -28,8 +27,8 @@ static char *sq_expand(char *src)
        int cnt, c;
        char *cp;
 
-       /* count single quote characters */ 
-       for (cnt = 0, cp = src; *cp; cnt++, cp++)
+       /* count bytes needed to store the quoted string. */ 
+       for (cnt = 1, cp = src; *cp; cnt++, cp++)
                if (*cp == '\'')
                        cnt += 3;