From: D. Ben Knoble Date: Tue, 26 Aug 2025 13:03:18 GMT Subject: Re: [PATCH RFC v2 09/16] builtin/history: implement "reorder" subcommand Message-ID: In-Reply-To: <20250824-b4-pks-history-builtin-v2-9-964ac12f65bd@pks.im> On Sun, Aug 24, 2025 at 1:43 PM Patrick Steinhardt wrote: > 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 > +git history reorder (--before=|--after=) > > DESCRIPTION > ----------- > @@ -39,12 +40,18 @@ rewrite history in different ways: > `drop `:: > 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? > +`reorder (--before=|--after=)`:: > + Move the commit so that it becomes either the parent of > + or the child of . 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