From: Tian Yuchen Date: Mon, 30 Mar 2026 17:23:07 GMT Subject: Re: [PATCH v6 2/2] replay: add --revert mode to reverse commit changes Message-ID: <1cf080ba-61a1-43b0-abff-c7c156c1c4b1@gmail.com> In-Reply-To: <6427d088-e41c-47ff-ab6e-4d7679e85d3c@gmail.com> 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