Skip to content

git log: configurable default format for merge diffs

Sergey Organov git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9diff-merges: introduce --diff-merges=defdiff-merges.c+6 -04 replies
2/9diff-merges: refactor set_diff_merges()diff-merges.c+24 -170 replies
3/9diff-merges: introduce log.diffMerges config variablebuiltin/log.c diff-merges.c diff-merges.h+15 -04 replies
4/9diff-merges: adapt -m to enable default diff formatdiff-merges.c+4 -40 replies
5/9t4013: add test for --diff-merges=deft/t4013-diff-various.sh+8 -00 replies
6/9t4013: add tests for log.diffMerges configt/t4013-diff-various.sh+26 -03 replies
7/9t9902: fix completion tests for log.d* to match log.diffMergest/t9902-completion.sh+3 -06 replies
8/9doc/diff-options: document new --diff-merges featuresDocumentation/diff-options.txt+11 -40 replies
9/9doc/config: document log.diffMergesDocumentation/config/log.txt+5 -00 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/9] git log: configurable default format for merge diffs

These patches introduce capability to configure the default format of output of diffs for merge commits by means of new log.diffMerges configuration variable. The default format is then used by -m, --diff-merges=m, and new --diff-merges=def options.

In particular,

git config log.diffMerges first-parent

will change -m option format from "separate" to "first-parent" that will in turn cause, say,

git show -m <merge_commit>

to output diff to the first parent only, instead of appending typically large and surprising diff to the second parent at the end of the output.

Sergey Organov (9):
diff-merges: introduce --diff-merges=def
diff-merges: refactor set_diff_merges()
diff-merges: introduce log.diffMerges config variable
diff-merges: adapt -m to enable default diff format
t4013: add test for --diff-merges=def
t4013: add tests for log.diffMerges config
t9902: fix completion tests for log.d* to match log.diffMerges doc/diff-options: document new --diff-merges features doc/config: document log.diffMerges

 Documentation/config/log.txt   |  5 +++
 Documentation/diff-options.txt | 15 ++++++---
 builtin/log.c                  |  2 ++
 diff-merges.c                  | 58 ++++++++++++++++++++++++----------
 diff-merges.h                  |  2 ++
 t/t4013-diff-various.sh        | 34 ++++++++++++++++++++
 t/t9902-completion.sh          |  3 ++
 7 files changed, 98 insertions(+), 21 deletions(-)
Signature · 1 line
2.25.1