Re: [PATCH v2 0/8] cherry-pick: add `--empty`
- From
- phillip.wood123@gmail.com <phillip.wood123@gmail.com>
- Date
- Feb 22, 2024, 16:39 UTC
- Message-ID
- <ad547799-07f1-4def-8e20-7e37a662c58f@gmail.com>
- In-Reply-To
- <20240210074859.552497-1-brianmlyles@gmail.com>
Hi Brian
On 10/02/2024 07:43, Brian Lyles wrote:
Show 15 quoted lines
> 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@mail.gmail.com > > 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.
Thanks for the revised patches - they are looking good and were a pleasant read. I've left a few small comments, my main concern is the change to `--keep-redundant-commits` in patch 6 which I'm not sure is really worth the disruption.
Best Wishes
Phillip
Show 24 quoted lines
> Brian Lyles (8): > 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=drop` > sequencer: treat error reading HEAD as unborn branch > sequencer: do not require `allow_empty` for redundant commit options > cherry-pick: decouple `--allow-empty` and `--keep-redundant-commits` > 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 | 40 +++++++++++-- > sequencer.c | 65 +++++++++++---------- > t/t3424-rebase-empty.sh | 55 ++++++++++++++++- > t/t3501-revert-cherry-pick.sh | 11 ++++ > t/t3505-cherry-pick-empty.sh | 29 ++++++++- > t/t3510-cherry-pick-sequence.sh | 40 +++++++++++++ > t/t3515-cherry-pick-incompatible-options.sh | 48 +++++++++++++++ > 11 files changed, 312 insertions(+), 68 deletions(-) > create mode 100755 t/t3515-cherry-pick-incompatible-options.sh >