diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-03-07 09:59:54 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-07 09:59:54 +0900 |
commit | c425d361f5bf46d99cd96d7eac3488ebb2e92b60 (patch) | |
tree | 9cfdd1b91fc759cb1e561c6302bbd9cfe37245ba /revision.c | |
parent | cf0879f7e98d2213503622f780d2ab0dd3f93477 (diff) | |
parent | d76ce4f734634f47b467b7f6eea11d6bf8c81f22 (diff) | |
download | git-c425d361f5bf46d99cd96d7eac3488ebb2e92b60.tar.gz |
Merge branch 'en/combined-all-paths'
Output from "diff --cc" did not show the original paths when the
merge involved renames. A new option adds the paths in the
original trees to the output.
* en/combined-all-paths:
log,diff-tree: add --combined-all-paths option
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 162d511d46..eb8e51bc63 100644 --- a/revision.c +++ b/revision.c @@ -2151,6 +2151,9 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->diff = 1; revs->dense_combined_merges = 0; revs->combine_merges = 1; + } else if (!strcmp(arg, "--combined-all-paths")) { + revs->diff = 1; + revs->combined_all_paths = 1; } else if (!strcmp(arg, "--cc")) { revs->diff = 1; revs->dense_combined_merges = 1; @@ -2647,6 +2650,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s } if (revs->combine_merges) revs->ignore_merges = 0; + if (revs->combined_all_paths && !revs->combine_merges) + die("--combined-all-paths makes no sense without -c or --cc"); + revs->diffopt.abbrev = revs->abbrev; if (revs->line_level_traverse) { |