mbox series

[0/6] diff-merges: let -m imply -p

Message ID 20210510153451.15090-1-sorganov@gmail.com (mailing list archive)
Headers show
Series diff-merges: let -m imply -p | expand

Message

Sergey Organov May 10, 2021, 3:34 p.m. UTC
Fix long standing inconsistency between -c/--cc that do imply -p, on
one side, and -m that did not imply -p, on the other side.

After these patches

  git log -m

will start to produce diffs without need to provide -p as well, that
improves both consistency and usability. It gets even more useful if
one sets "log.diffMerges" configuration variable to "first-parent" to
force -m produce usual diff with respect to first parent only.

Previous semantics of -m could still be accessed using
--diff-merges=separate option.

First 5 patches in the series are refactoring that is not expected to
change existing behavior, and the last one is the actual functional
change.

Sergey Organov (6):
  t4013: add test for "git diff-index -m"
  diff-merges: move specific diff-index "-m" handling to diff-index
  git-svn: stop passing "-m" to "git rev-list"
  stash list: stop passing "-m" to "git list"
  diff-merges: rename "combined_imply_patch" to "merges_imply_patch"
  diff-merges: let -m imply -p

 Documentation/diff-options.txt |  8 +++---
 builtin/diff-index.c           | 45 ++++++++++++++++++++++++++--------
 builtin/stash.c                |  2 +-
 diff-merges.c                  | 24 ++++++------------
 perl/Git/SVN.pm                |  2 +-
 revision.h                     |  2 +-
 t/t3903-stash.sh               |  2 +-
 t/t4013-diff-various.sh        | 13 ++++++++++
 8 files changed, 63 insertions(+), 35 deletions(-)