aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2010-10-10 19:24:06 +0200
committerJunio C Hamano <gitster@pobox.com>2010-10-16 18:57:35 -0700
commit8837d33595b78dc4a52038856bc9a5c3f4b2ff50 (patch)
tree230f192ba2e15ea0e0e195037263c57172a4b826 /diff.c
parent593ce2bea5dad436e87b5dd37c205961d73feae9 (diff)
downloadgit-8837d33595b78dc4a52038856bc9a5c3f4b2ff50.tar.gz
git-8837d33595b78dc4a52038856bc9a5c3f4b2ff50.tar.xz
diff --check: correct line numbers of new blank lines at EOF
The whitespace check printed the value of the wrong variable, i.e. the beginning of the block of blank lines at the EOF (possibly absent) in the old file. As "git diff --check" is used by users to check their changes before making a commit, we should point at the line number in the file after the change. Signed-off-by: Christoph Mallon <christoph.mallon@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index a2d8c7f9a..38ba98932 100644
--- a/diff.c
+++ b/diff.c
@@ -1888,7 +1888,7 @@ static void builtin_checkdiff(const char *name_a, const char *name_b,
ecbdata.ws_rule = data.ws_rule;
check_blank_at_eof(&mf1, &mf2, &ecbdata);
- blank_at_eof = ecbdata.blank_at_eof_in_preimage;
+ blank_at_eof = ecbdata.blank_at_eof_in_postimage;
if (blank_at_eof) {
static char *err;