summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-27 01:12:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-27 01:12:47 (GMT)
commitc0f5c69c680395a45294184dcf0923cea530b9af (patch)
tree6d309c32b2b9d97ccdd7899de9a309d31db085d5 /diff.c
parentd2bf48d2ad653ee8a052aa460ca5c6ef29dce41d (diff)
parent7ac749c96d143ba4f76723959892cbaddbe8ed07 (diff)
downloadgit-c0f5c69c680395a45294184dcf0923cea530b9af.zip
git-c0f5c69c680395a45294184dcf0923cea530b9af.tar.gz
git-c0f5c69c680395a45294184dcf0923cea530b9af.tar.bz2
Merge branch 'maint'
* maint: GIT 1.5.5.5 GIT 1.5.4.6 git-shell: accept "git foo" form diff --check: do not discard error status upon seeing a good line
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 44e8790..8939423 100644
--- a/diff.c
+++ b/diff.c
@@ -1151,12 +1151,14 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
char *err;
if (line[0] == '+') {
+ unsigned bad;
data->lineno++;
- data->status = check_and_emit_line(line + 1, len - 1,
+ bad = check_and_emit_line(line + 1, len - 1,
data->ws_rule, NULL, NULL, NULL, NULL);
- if (!data->status)
+ if (!bad)
return;
- err = whitespace_error_string(data->status);
+ data->status |= bad;
+ err = whitespace_error_string(bad);
fprintf(data->file, "%s:%d: %s.\n", data->filename, data->lineno, err);
free(err);
emit_line(data->file, set, reset, line, 1);