summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-09-18 20:30:12 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-09-18 20:30:12 -0700
commit3791f77c28f233df121da2f83abf7eefc7b49b69 (patch)
tree8c50a58cf599933aa412a30d7cac615092d42aa0 /builtin-diff.c
parentMerge branch 'jc/diff-prefix' (diff)
parentMerge branch 'dp/maint-rebase-fix' into maint (diff)
downloadtgif-3791f77c28f233df121da2f83abf7eefc7b49b69.tar.xz
Merge branch 'maint'
* maint: sha1_file: link() returns -1 on failure, not errno Make git archive respect core.autocrlf when creating zip format archives Add new test to demonstrate git archive core.autocrlf inconsistency gitweb: avoid warnings for commits without body Clarified gitattributes documentation regarding custom hunk header. git-svn: fix handling of even funkier branch names git-svn: Always create a new RA when calling do_switch for svn:// git-svn: factor out svnserve test code for later use diff/diff-files: do not use --cc too aggressively
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 52470c7f41..35da366f46 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -225,7 +225,13 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
argv++; argc--;
}
- if (revs->max_count == -1 &&
+ /*
+ * "diff --base" should not combine merges because it was not
+ * asked to. "diff -c" should not densify (if the user wants
+ * dense one, --cc can be explicitly asked for, or just rely
+ * on the default).
+ */
+ if (revs->max_count == -1 && !revs->combine_merges &&
(revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;