Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-13 02:46:32 +0400
committerJunio C Hamano <gitster@pobox.com>2012-03-13 02:46:32 +0400
commitfce8b5d82fadd0bc27b12ae91bf7ad74d6488e97 (patch)
treeb5e532b473b7bde254ad1218265369965191133c /diff.c
parentf629c233e6dd72924ed2672db142708b71dc663e (diff)
parentb3f01ff29f7131e959bcfdfd004744d74d5fa319 (diff)
Merge branch 'jc/maint-diff-patch-header' into maint
"git diff-index" and its friends at the plumbing level showed the "diff --git" header and nothing else for a path whose cached stat info is dirty without actual difference when asked to produce a patch. This was a longstanding bug that we could have fixed long time ago. By Junio C Hamano * jc/maint-diff-patch-header: diff -p: squelch "diff --git" header for stat-dirty paths t4011: illustrate "diff-index -p" on stat-dirty paths t4011: modernise style
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 05d0814e27..5388ded214 100644
--- a/diff.c
+++ b/diff.c
@@ -2210,7 +2210,7 @@ static void builtin_diff(const char *name_a,
struct emit_callback ecbdata;
const struct userdiff_funcname *pe;
- if (!DIFF_XDL_TST(o, WHITESPACE_FLAGS) || must_show_header) {
+ if (must_show_header) {
fprintf(o->file, "%s", header.buf);
strbuf_reset(&header);
}