diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-02-05 16:40:44 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-02-05 16:40:44 -0800 |
| commit | aac006aa99fd94ac1665d6daa31b9e289914bfe7 (patch) | |
| tree | 4a7ff0b3a52c0c643ddcaed01fc130310b70b21c /builtin/diff-files.c | |
| parent | The fifth batch (diff) | |
| parent | t4013: add tests for --diff-merges=first-parent (diff) | |
| download | git-aac006aa99fd94ac1665d6daa31b9e289914bfe7.tar.gz git-aac006aa99fd94ac1665d6daa31b9e289914bfe7.zip | |
Merge branch 'so/log-diff-merge'
"git log" learned a new "--diff-merges=<how>" option.
* so/log-diff-merge: (32 commits)
t4013: add tests for --diff-merges=first-parent
doc/git-show: include --diff-merges description
doc/rev-list-options: document --first-parent changes merges format
doc/diff-generate-patch: mention new --diff-merges option
doc/git-log: describe new --diff-merges options
diff-merges: add '--diff-merges=1' as synonym for 'first-parent'
diff-merges: add old mnemonic counterparts to --diff-merges
diff-merges: let new options enable diff without -p
diff-merges: do not imply -p for new options
diff-merges: implement new values for --diff-merges
diff-merges: make -m/-c/--cc explicitly mutually exclusive
diff-merges: refactor opt settings into separate functions
diff-merges: get rid of now empty diff_merges_init_revs()
diff-merges: group diff-merge flags next to each other inside 'rev_info'
diff-merges: split 'ignore_merges' field
diff-merges: fix -m to properly override -c/--cc
t4013: add tests for -m failing to override -c/--cc
t4013: support test_expect_failure through ':failure' magic
diff-merges: revise revs->diff flag handling
diff-merges: handle imply -p on -c/--cc logic for log.c
...
Diffstat (limited to 'builtin/diff-files.c')
| -rw-r--r-- | builtin/diff-files.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/diff-files.c b/builtin/diff-files.c index 1e352dd8f7..4742a4559b 100644 --- a/builtin/diff-files.c +++ b/builtin/diff-files.c @@ -7,6 +7,7 @@ #include "cache.h" #include "config.h" #include "diff.h" +#include "diff-merges.h" #include "commit.h" #include "revision.h" #include "builtin.h" @@ -69,9 +70,9 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix) * 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 && + if (rev.max_count == -1 && (rev.diffopt.output_format & DIFF_FORMAT_PATCH)) - rev.combine_merges = rev.dense_combined_merges = 1; + diff_merges_set_dense_combined_if_unset(&rev); if (read_cache_preload(&rev.diffopt.pathspec) < 0) { perror("read_cache_preload"); |
