[PATCH v4 0/7] cherry-pick: add `--empty` for more robust redundant commit handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ultimate goal of this series is to allow git-cherry-pick(1) to
automatically drop redundant commits. The mechanism chosen is an
`--empty` option that provides the same flexibility as the `--empty`
options for git-rebase(1) and git-am(1).

Some secondary goals are to improve the consistency in the values and
documentation for this option across the three commands.

See "Does extending `--empty` to git-cherry-pick make sense?" [1] for
some context for why this option is desired in git-cherry-pick(1).

[1]: https://lore.kernel.org/git/CAHPHrSevBdQF0BisR8VK=jM=wj1dTUYEVrv31gLerAzL9=Cd8Q@xxxxxxxxxxxxxx

Along the way, I (with some help from Elijah and Phillip) found a few
other things in the docs and related sequencer code to clean up.

This re-roll contains only minor changes from v3.

Brian Lyles (7):
  docs: address inaccurate `--empty` default with `--exec`
  docs: clean up `--empty` formatting in git-rebase(1) and git-am(1)
  rebase: update `--empty=ask` to `--empty=stop`
  sequencer: handle unborn branch with `--allow-empty`
  sequencer: do not require `allow_empty` for redundant commit options
  cherry-pick: enforce `--keep-redundant-commits` incompatibility
  cherry-pick: add `--empty` for more robust redundant commit handling

 Documentation/git-am.txt          | 20 +++++----
 Documentation/git-cherry-pick.txt | 30 ++++++++++----
 Documentation/git-rebase.txt      | 26 ++++++++----
 builtin/rebase.c                  | 16 +++++---
 builtin/revert.c                  | 38 ++++++++++++++++-
 sequencer.c                       | 68 +++++++++++++++++--------------
 t/t3424-rebase-empty.sh           | 55 +++++++++++++++++++++++--
 t/t3501-revert-cherry-pick.sh     | 14 +++++--
 t/t3505-cherry-pick-empty.sh      | 51 ++++++++++++++++++++++-
 t/t3510-cherry-pick-sequence.sh   | 32 +++++++++++++++
 10 files changed, 283 insertions(+), 67 deletions(-)

-- 
2.43.2





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux