summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-21 22:56:04 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-21 22:56:04 -0800
commit27e4dd8de76bdd60c88003e0f27cee8ad26c5cd6 (patch)
tree3fa180f4495853016b854cc524c425cbbc905845 /diff.c
parent95f2fb7d9f84779bf036bb748e245c91bc572840 (diff)
parente6d40d65df07059fc655fabe62fa5b575ead7815 (diff)
downloadgit-27e4dd8de76bdd60c88003e0f27cee8ad26c5cd6.tar.gz
Merge branch 'maint'
* maint: diff --check: fix off by one error spurious .sp in manpages
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 91f956b23b..f14288bb8a 100644
--- a/diff.c
+++ b/diff.c
@@ -860,8 +860,6 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
if (line[0] == '+') {
int i, spaces = 0;
- data->lineno++;
-
/* check space before tab */
for (i = 1; i < len && (line[i] == ' ' || line[i] == '\t'); i++)
if (line[i] == ' ')
@@ -876,6 +874,8 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
if (isspace(line[len - 1]))
printf("%s:%d: white space at end: %.*s\n",
data->filename, data->lineno, (int)len, line);
+
+ data->lineno++;
} else if (line[0] == ' ')
data->lineno++;
else if (line[0] == '@') {