Re: [PATCH 1/1] replay: add --revert option to reverse commit changes
From: Junio C Hamano <hidden>
Date: 2025-11-26 18:41:36
Started by Junio C Hamano on Nov 26, 2025
open the first message on its own page
From: Junio C Hamano <hidden>
Date: 2025-11-26 18:41:36
Elijah Newren [off-list ref] writes:
quoted
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.
And yes, Siddharth, you were right that the new mode should be incompatible with --contained, but that's because --contained is a special modifier of --onto. --onto, --advance, and --revert are three different modes that are incompatible with each other.
This answers the question I had on the patch perfectly.