Re: [PATCH 1/1] replay: add --revert option to reverse commit changes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2025, 21:17 UTC
- Message-ID
- <xmqq3460mr3c.fsf@gitster.g>
- In-Reply-To
- <xmqq3460ocv7.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Elijah Newren <newren@gmail.com> writes: > >>> I'm struggling to understand when I'd want to do this. Why would I want >>> to update 'feature' to point to the reverted version of its last tree >>> commits rebased onto 'main'? >>> ... >> I was going to say the same thing, but from a different angle. >> >> The sequencer in git is used for three different types of operations: >> rebasing, cherry-picking, and reverting a range (with a sequence of >> reverts rather than one big revert). In replay, these correspond to >> --onto, --advance, and the new thing you are trying to add. As such, >> it should be its own new mode. > > This is a great comment that clarifies what the problem is with this.
Stepping back a bit, is it just me who thinks that the "--onto" option is a misnamed "--rebase", and the "--advance" option is a misnamed "--cherry-pick"?
Perhaps it is already way too late to remedy, but if we ever want to change it, we should do so while "replay" is still marked experimental.