Re: [PATCH v5 2/2] replay: add --revert mode to reverse commit changes
Siddharth Asthana <siddharthasthana31@gmail.com> writes:
Show 17 quoted lines
> 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.
> repo_init_revisions(repo, &revs, prefix);