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

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

 



Hi Brian

On 10/03/2024 18:41, Brian Lyles wrote:
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.

The primary difference from v2 of this patch is that I no longer make
any attempt to change the behavior of `--keep-redundant-commits`
implying `--allow-empty`, and the new `--empty=keep` will likewise also
imply `--allow-empty`. See "Re: [PATCH v2 8/8] cherry-pick: add
`--empty` for more robust redundant commit handling" [2] and the
previous messages in that thread for more context. Patch 6/8 from v2 is
dropped entirely, with some adjustments to the ultimate patch in this
series as well.

This is looking good, I've left a couple of comments but there is nothing major.

Thanks for working on it

Phillip

[2]: https://lore.kernel.org/git/xmqqttltu7zs.fsf@gitster.g/

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: treat error reading HEAD as unborn branch
   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                       | 64 ++++++++++++++++---------------
  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, 279 insertions(+), 67 deletions(-)





[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