From: Phillip Wood Date: Wed, 25 Mar 2026 16:44:13 GMT Subject: Re: [PATCH v5 2/2] replay: add --revert mode to reverse commit changes Message-ID: <56632ad9-d953-4884-858c-038448f30a1d@gmail.com> In-Reply-To: <87cy0s0wt5.fsf@iotcl.com> On 25/03/2026 15:10, Toon Claes wrote: > Junio C Hamano writes: > >> Siddharth Asthana writes: >> >>> diff --git a/builtin/replay.c b/builtin/replay.c >>> index 2cdde830a8..d3c1d920f0 100644 >>> --- a/builtin/replay.c >>> +++ b/builtin/replay.c >>> @@ -83,7 +83,7 @@ int cmd_replay(int argc, >>> ... >>> /* Parse ref action mode from command line or config */ >>> ref_mode = get_ref_action_mode(repo, ref_action); >>> >>> + /* >>> + * Cherry-pick/rebase need oldest-first ordering so that each >>> + * replayed commit can build on its already-replayed parent. >>> + * Revert needs newest-first ordering (like git revert) to >>> + * reduce conflicts by peeling off changes from the top. >>> + */ >>> + int desired_reverse = !opts.revert; >>> + >> >> Compiler notices -Werror=declaration-after-statement error here. > > That's basically the only comment I have on this series. Yes, everything else in the range-diff looks good to me Thanks Phillip > Except for one micro-hit on the existing docs about : > > :: > Range of commits to replay; see "Specifying Ranges" in > linkgit:git-rev-parse[1]. In `--advance ` mode, the > range should have a single tip, so that it's clear to which tip the > advanced should point. Any commits in the range whose > changes are already present in the branch the commits are being > replayed onto will be dropped. > > Next to --advance, we should also mention --revert. But that's totally > not worth a reroll and can be addressed in any other later series. >