diff options
author | Sergey Organov <sorganov@gmail.com> | 2020-12-21 18:19:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-21 13:47:31 -0800 |
commit | 6fc944d8956bf75bf2e52a871c02b71b4f9dfcba (patch) | |
tree | f14539c4165b7440c969453102f8f5c55e8be020 | |
parent | t4013: add tests for -m failing to override -c/--cc (diff) | |
download | tgif-6fc944d8956bf75bf2e52a871c02b71b4f9dfcba.tar.xz |
diff-merges: fix -m to properly override -c/--cc
Logically, -m, -c, --cc specify 3 different formats for representing
merge commits, yet -m doesn't in fact override -c or --cc, that makes
no sense.
Fix -m to properly override -c/--cc, and change the tests accordingly.
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | diff-merges.c | 1 | ||||
-rwxr-xr-x | t/t4013-diff-various.sh | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/diff-merges.c b/diff-merges.c index 225edd293b..047bf81e67 100644 --- a/diff-merges.c +++ b/diff-merges.c @@ -33,6 +33,7 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv) const char *arg = argv[0]; if (!strcmp(arg, "-m")) { + suppress(revs); /* * To "diff-index", "-m" means "match missing", and to the "log" * family of commands, it means "show full diff for merges". Set diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 64d9fce446..8d8178a8a6 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -329,8 +329,8 @@ log --first-parent --diff-merges=off -p master log -p --first-parent master log -m -p --first-parent master log -m -p master -:failure log --cc -m -p master -:failure log -c -m -p master +log --cc -m -p master +log -c -m -p master log -SF master log -S F master log -SF -p master |