Subject: Re: [PATCH v6 2/2] replay: add --revert mode to reverse commit changes

From: Tian Yuchen <[email-masked]>
Date: Tue, 31 Mar 2026 01:23:07 +0800

On 3/30/26 00:17, Siddharth Asthana wrote:

>>
>> This is a fail-safe design intended to prevent users from entering 
>> commands like:
>>
>>      git replay --revert main f1 f2
>>
>> This operation is indeed undefined which should be intercepted. 
>> However, considering:
>>
>>      git replay --revert main HEAD~5..HEAD~3 HEAD~1..HEAD
>>
>> Is this operation also intercepted? I think the reason is that the 
>> condition 'rinfo->positive_refexprs > 1' is a bit too simplistic.
> 
> 
> Yes -- positive_refexprs counts each position tip, so that gives 2 and 
> the > 1 check catches it.
> 
> 

What I mean is, this operation shouldn't be intercepted, right? In my 
view, it is valid to select and operate two (and more) periods from the 
same linear commit history, but that is blocked here.

Never mind, it's nothing important. The rest looks good to me. Keep it up!

Regards, Yuchen