X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-diff-files.c;h=2b578c714d36c600107f03b454ed8241dc2d4f19;hb=d5c527448db30be55553e0b125015e8d444f8dbc;hp=384d871263383e89c6f8f52b16e9e7e147426d1d;hpb=ea81e10ff4e31820407f4cb1b8ebd87de9e51737;p=git.git diff --git a/builtin-diff-files.c b/builtin-diff-files.c index 384d87126..2b578c714 100644 --- a/builtin-diff-files.c +++ b/builtin-diff-files.c @@ -10,7 +10,7 @@ #include "builtin.h" static const char diff_files_usage[] = -"git-diff-files [-q] [-0/-1/2/3 |-c|--cc] [] [...]" +"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [] [...]" COMMON_DIFF_OPTIONS_HELP; int cmd_diff_files(int argc, const char **argv, const char *prefix) @@ -50,7 +50,12 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix) 3 < rev.max_count) usage(diff_files_usage); - if (rev.max_count == -1 && + /* + * "diff-files --base -p" should not combine merges because it + * was not asked to. "diff-files -c -p" should not densify + * (the user should ask with "diff-files --cc" explicitly). + */ + if (rev.max_count == -1 && !rev.combine_merges && (rev.diffopt.output_format & DIFF_FORMAT_PATCH)) rev.combine_merges = rev.dense_combined_merges = 1;