summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorWincent Colaiuta <win@wincent.com>2007-12-13 13:32:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-14 07:43:58 (GMT)
commit45e2a4b2b0a07cda05dda08b47906100c4711e4e (patch)
tree6054aa81f13785dcf7869cd0340ecd5a2083aa04 /diff.c
parentc1795bb08aae9fb7e4dc1a01e292b85e59b1c640 (diff)
downloadgit-45e2a4b2b0a07cda05dda08b47906100c4711e4e.zip
git-45e2a4b2b0a07cda05dda08b47906100c4711e4e.tar.gz
git-45e2a4b2b0a07cda05dda08b47906100c4711e4e.tar.bz2
Make "diff --check" output match "git apply"
For consistency, make the two tools report whitespace errors in the same way (the output of "diff --check" has been tweaked to match that of "git apply"). Note that although the textual content is basically the same only "git diff --check" provides a colorized version of the problematic lines; making "git apply" do colorization will require more extensive changes (figuring out the diff colorization preferences of the user) and so that will be a subject for another commit. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 577c773..08ec66c 100644
--- a/diff.c
+++ b/diff.c
@@ -973,8 +973,7 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
if (!data->status)
return;
err = whitespace_error_string(data->status);
- printf("%s:%d: %s%s:%s ", data->filename, data->lineno,
- ws, err, reset);
+ printf("%s:%d: %s.\n", data->filename, data->lineno, err);
free(err);
emit_line(set, reset, line, 1);
(void)check_and_emit_line(line + 1, len - 1, data->ws_rule,