Thread (29 messages) 29 messages, 5 authors, 2021-04-13
STALE1889d
Revisions (3)
  1. v1 current
  2. v1 [diff vs current]
  3. v2 [diff vs current]

[PATCH 0/9] git log: configurable default format for merge diffs

From: Sergey Organov <hidden>
Date: 2021-04-07 22:56:24

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(-)

-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help