aboutsummaryrefslogtreecommitdiffstats
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-09 13:53:07 -0700
committerJunio C Hamano <gitster@pobox.com>2020-09-09 13:53:07 -0700
commitc1ce30d364e2161c558466cf938ca71fb456f6c3 (patch)
tree3c90f4d0dcbe0975240c072b02a7a0be63ec6d9d /revision.c
parenteb7460fd312511941d64007b5dfc4799a20a8d18 (diff)
parent572fc9aa5471ce7a9888f03a32d556350f88a5cf (diff)
downloadgit-c1ce30d364e2161c558466cf938ca71fb456f6c3.tar.gz
Merge branch 'so/separate-field-for-m-and-diff-merges'
Internal API clean-up to handle two options "diff-index" and "log" have, which happen to share the same short form, more sensibly. * so/separate-field-for-m-and-diff-merges: revision: add separate field for "-m" of "diff-index -m"
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 08c2ad23af..0d67b842fd 100644
--- a/revision.c
+++ b/revision.c
@@ -2352,7 +2352,13 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->diffopt.flags.recursive = 1;
revs->diffopt.flags.tree_in_recursive = 1;
} else if (!strcmp(arg, "-m")) {
+ /*
+ * To "diff-index", "-m" means "match missing", and to the "log"
+ * family of commands, it means "show full diff for merges". Set
+ * both fields appropriately.
+ */
revs->ignore_merges = 0;
+ revs->match_missing = 1;
} else if ((argcount = parse_long_opt("diff-merges", argv, &optarg))) {
if (!strcmp(optarg, "off")) {
revs->ignore_merges = 1;