summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-09-18 20:30:12 -0700
committerJunio C Hamano <gitster@pobox.com>2008-09-18 20:30:12 -0700
commit3791f77c28f233df121da2f83abf7eefc7b49b69 (patch)
tree8c50a58cf599933aa412a30d7cac615092d42aa0 /builtin-diff.c
parente69a6f47c4e25a20170eb989a55257d0399f795b (diff)
parentea2408bfe18b4f9d1eaa9d8587c5ae6196552cac (diff)
downloadgit-3791f77c28f233df121da2f83abf7eefc7b49b69.tar.gz
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;