Re: [PATCH RFC v2 09/16] builtin/history: implement "reorder" subcommand
On Sun, Aug 24, 2025 at 1:43 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 22 quoted lines
> diff --git a/Documentation/git-history.adoc b/Documentation/git-history.adoc
> index db5b292994..b36cd925dd 100644
> --- a/Documentation/git-history.adoc
> +++ b/Documentation/git-history.adoc
> @@ -12,6 +12,7 @@ git history abort
> git history continue
> git history quit
> git history drop <commit>
> +git history reorder <commit> (--before=<following-commit>|--after=<preceding-commit>)
>
> DESCRIPTION
> -----------
> @@ -39,12 +40,18 @@ rewrite history in different ways:
> `drop <commit>`::
> Drop a commit from the history and reapply all children of that
> commit on top of the commit's parent. The commit that is to be
> - dropped must be reachable from the current `HEAD` commit.
> + dropped must be reachable from the currently checked-out commit.
> +
> Dropping the root commit converts the child of that commit into the new
> root commit. It is invalid to drop a root commit that does not have any
> child commits, as that would lead to an empty branch.
Fixup in the wrong commit, maybe?
Show 9 quoted lines
> +`reorder <commit> (--before=<following-commit>|--after=<preceding-commit>)`::
> + Move the commit so that it becomes either the parent of
> + <following-commit> or the child of <preceding-commit>. The commits must
> + be related to one another and must be reachable from the current `HEAD`
> + commit.
> +
> The following commands are used to manage an interrupted history-rewriting
> operation:
>
--
D. Ben Knoble