From 6fae74b418da05a80897487805c833fd0b253df3 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 29 Jul 2020 16:10:20 -0400 Subject: revision: add "--no-diff-merges" option to counteract "-m" The "-m" option sets revs->ignore_merges to "0", but there's no way to undo it. This probably isn't something anybody overly cares about, since "1" is already the default, but it will serve as an escape hatch when we flip the default for ignore_merges to "0" in more situations. We'll also add a few extra niceties: - initialize the value to "-1" to indicate "not set", and then resolve it to the normal 0/1 bool in setup_revisions(). This lets any tweak functions, as well as setup_revisions() itself, avoid clobbering the user's preference (which until now they couldn't actually express). - since we now have --no-diff-merges, let's add the matching --diff-merges, which is just a synonym for "-m". Then we don't even need to document --no-diff-merges separately; it countermands the long form of "-m" in the usual way. The new test shows that this behaves just the same as the current behavior without "-m". Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t4013-diff-various.sh | 1 + 1 file changed, 1 insertion(+) (limited to 't/t4013-diff-various.sh') diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 43267d6024..40e222c945 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -297,6 +297,7 @@ log --root --patch-with-stat --summary master log --root -c --patch-with-stat --summary master # improved by Timo's patch log --root --cc --patch-with-stat --summary master +log --no-diff-merges -p --first-parent master log -p --first-parent master log -m -p --first-parent master log -m -p master -- cgit v1.2.3