summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorWincent Colaiuta <win@wincent.com>2007-12-13 14:32:30 +0100
committerJunio C Hamano <gitster@pobox.com>2007-12-13 23:43:58 -0800
commit45e2a4b2b0a07cda05dda08b47906100c4711e4e (patch)
tree6054aa81f13785dcf7869cd0340ecd5a2083aa04 /builtin-apply.c
parentc1795bb08aae9fb7e4dc1a01e292b85e59b1c640 (diff)
downloadgit-45e2a4b2b0a07cda05dda08b47906100c4711e4e.tar.gz
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 'builtin-apply.c')
-rw-r--r--builtin-apply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index ab393f32e9..2edd83bf40 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -912,8 +912,8 @@ static void check_whitespace(const char *line, int len, unsigned ws_rule)
;
else {
err = whitespace_error_string(result);
- fprintf(stderr, "%s.\n%s:%d:%.*s\n",
- err, patch_input_file, linenr, len - 2, line + 1);
+ fprintf(stderr, "%s:%d: %s.\n%.*s\n",
+ patch_input_file, linenr, err, len - 2, line + 1);
free(err);
}
}