Skip to content

diff-merges: more features

Sergey Organov git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5diff-merges: implement [no-]hide option and log.diffMergesHide configDocumentation/config/log.txt Documentation/diff-options.txt builtin/log.c +5 more+147 -72 replies
1/5diff-merges: implement [no-]hide option and log.diffMergesHide configDocumentation/config/log.txt Documentation/diff-options.txt builtin/log.c +5 more+147 -70 replies
2/5diff-merges: implement log.diffMerges-m-imply-p configDocumentation/config/log.txt Documentation/diff-options.txt builtin/log.c +4 more+31 -20 replies
2/5diff-merges: implement log.diffMerges-m-imply-p configDocumentation/config/log.txt Documentation/diff-options.txt builtin/log.c +4 more+31 -20 replies
3/5diff-merges: implement log.diffMergesForce configDocumentation/config/log.txt builtin/log.c diff-merges.c +3 more+62 -610 replies
3/5diff-merges: support list of values for --diff-mergesDocumentation/diff-options.txt diff-merges.c t/t4013-diff-various.sh+29 -60 replies
4/5diff-merges: support list of values for --diff-mergesDocumentation/diff-options.txt diff-merges.c t/t4013-diff-various.sh+29 -60 replies
4/5diff-merges: issue warning on lone '-m' optiondiff-merges.c+5 -10 replies
5/5diff-merges: issue warning on lone '-m' optiondiff-merges.c+5 -10 replies
5/5diff-merges: improve --diff-merges documentationDocumentation/diff-options.txt+62 -520 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] diff-merges: more features

1. --diff-merges=[no]-hide

The set of diff-merges options happened to be incomplete, and failed to implement exact semantics of -m option that hides output of diffs for merge commits unless -p option is active as well.

The new "hide" option fixes this issue, so that now

  --diff-merges=on --diff-merges=hide

combo is the exact synonym for -m.

The log.diffMerges configuration also accepts "hide" and "no-hide" values, and governs the default value for the hide bit. The configuration behaves as if "--diff-merges=[no-]hide" is inserted first in the command-line.

2. log.diffMerges-m-imply-p

Historically, '-m' doesn't imply '-p' whereas similar '-c' and '--cc' options do. Simply fixing this inconsistency by unconditional modification of '-m' semantics appeared to be a bad idea, as it broke some legacy scripts/aliases. This patch rather provides configuration variable to tweak '-m' behavior accordingly.

3. log.diffMergesForce

Force specific log format for -c, --cc, and --remerge-diff options instead of their respective formats. The override is useful when some external tool hard-codes diff for merges format option.

4. Support list of values for --diff-merges

This allows for shorter --diff-merges=on,hide forms.

5. Issue warning for lone '-m'.

Lone '-m' is in use by scripts/aliases that aim at enabling diff output for merge commits, but only if '-p' is then specified as well.

As '-m' may now be configured to imply '-p' (using 'log.diffMerges-m-imply-p'), issue warning if lone '-m' is specified, and suggest to instead use '--diff-merges=on,hide' that does not depend on user configuration.

This is expected to give a provision for enabling log.diffMerges-m-imply-p by default in the future.

Sergey Organov (5):
diff-merges: implement [no-]hide option and log.diffMergesHide config
diff-merges: implement log.diffMerges-m-imply-p config
diff-merges: implement log.diffMergesForce config
diff-merges: support list of values for --diff-merges
diff-merges: issue warning on lone '-m' option

 Documentation/config/log.txt                  |  20 ++++
 Documentation/diff-options.txt                |  20 +++-
 builtin/log.c                                 |   6 +
 diff-merges.c                                 | 108 +++++++++++++++---
 diff-merges.h                                 |   6 +
 t/t4013-diff-various.sh                       |  89 ++++++++++++++-
 ...ges=first-parent_--diff-merges=hide_master |  34 ++++++
 t/t9902-completion.sh                         |   9 ++
 8 files changed, 272 insertions(+), 20 deletions(-)
 create mode 100644 t/t4013/diff.log_--diff-merges=first-parent_--diff-merges=hide_master
Signature · 1 line
2.37.3.526.g5f84746cb16b