revision: add "--no-diff-merges" option to counteract "-m"
authorJeff King <redacted>
Wed, 29 Jul 2020 20:10:20 +0000 (16:10 -0400)
committerJunio C Hamano <redacted>
Wed, 29 Jul 2020 20:43:57 +0000 (13:43 -0700)
commit6fae74b418da05a80897487805c833fd0b253df3
tree5e8167bcf4b3a876bcb615ee1ba36b0ef95ca84d
parenteed5332a13ef15391039e5e953462201978058ec
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Documentation/rev-list-options.txt
builtin/log.c
revision.c
revision.h
t/t4013-diff-various.sh
t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT