Re: [PATCH 1/1] replay: add --revert option to reverse commit changes
- From
Siddharth Asthana <siddharthasthana31@gmail.com>
- Date
- Nov 27, 2025, 19:24 UTC
- Message-ID
- <20b34c44-a04e-4632-b69a-586ac7c97aa4@gmail.com>
- In-Reply-To
- <bc974d63-b3f1-4ef9-8fc5-e7e719b6ae89@gmail.com>
On 27/11/25 21:51, Phillip Wood wrote:
Show 18 quoted lines
> Hi Siddharth > > On 26/11/2025 19:39, Siddharth Asthana wrote: >> >> The realistic use case is reverting commits from a branch where those >> commits already exist. For example: >> >> git replay --revert main~3..main >> >> This would revert the last 3 commits on main, creating revert commits >> on top of main. > > We want to be able to revert an arbitary range of commits. That means > we need to give --revert a branch name to update in addition to the > range of commits to revert. The following example would update "main", > reverting all the commits from the branch "feature" > > git replay --revert main main..feature
Makes sense. I will restructure --revert to take a branch argument, making it a proper mode alongside --onto and --advance:
git replay --revert <branch> <revision-range>
This keeps the syntax consistent with the other modes.
Thanks, Siddharth
Show 5 quoted lines
> > Thanks > > Phillip >