git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] replay: support replaying down from root commit

From
Ben Knoble <ben.knoble@gmail.com>
Date
Mar 25, 2026, 12:19 UTC
Message-ID
<E0A14573-BBE2-4ADF-989C-E5B2A7E3E166@gmail.com>
In-Reply-To
<CAP8UFD1zJXnsm7POK32GqEu4xSC+VO5mfzUpM-jn+Nr1qvzEFQ@mail.gmail.com>
Show 28 quoted lines
> Le 25 mars 2026 à 06:05, Christian Couder <christian.couder@gmail.com> a écrit :
> 
> On Tue, Mar 24, 2026 at 8:56 PM Junio C Hamano <gitster@pobox.com> wrote:
>> 
>> Toon Claes <toon@iotcl.com> writes:
>> 
>>> git-replay(1) doesn't allow replaying commits all the way down to the
>>> root commit. Fix that.
>>> 
>>> Signed-off-by: Toon Claes <toon@iotcl.com>
>>> ---
>>> These changes might conflict Siddharth's series[1] to add '--revert' to
>>> git-replay(1), although resolving that should be trivial.
>> 
>> True.  This round looks great to me.  Will queue.
>> 
>> Shall we mark the topic for 'next' now?
> 
> The patch looks good to me, but I wonder if the docs should be updated
> somehow, especially to try to avoid confusion in case users don't
> properly specify a range.
> 
> For example, before this, `git replay --onto main topic` would fail,
> but emit "fatal: replaying down from root commit is not supported
> yet!". This would likely help users understand that they might need to
> properly specify a range like "main..topic" instead of 'topic".
> 
> Now it would likely fail without any error message.
Having used replay in a large monorepo where I juggle many branches (so rebasing another in-flight topic without otherwise interrupting my work is valuable), I’ve made this mistake a few times. Some way of handling it more gracefully would be appreciated: perhaps the root case is rare enough to warrant an option or confirmation prompt (when attached interactively)?
Show 24 quoted lines
> 
> Maybe something like the following could help:
> 
> --- a/Documentation/git-replay.adoc
> +++ b/Documentation/git-replay.adoc
> @@ -23,6 +23,10 @@ instead get update commands that can be piped to
> `git update-ref --stdin`
> 
> THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
> 
> +Note that `git replay --onto main topic` replays the topic branch starting
> +from the root commit, not from main. What you might want instead is
> +`git replay --onto main main..topic`.
> +
> OPTIONS
> -------
> 
> ?
> 
> And yeah currently `git replay` is a plumbing command that most
> regular users shouldn't likely use, but I think Elijah's goal was to
> eventually make it user friendly enough for advanced users with
> stacked branches.
> 
Previous: Christian CouderNext: Toon Claes
Message 7 of 17 in “replay: support replaying down from root commit”
  1. replay: support replaying down from root commitToon Claes, Mar 17, 2026
  2. Junio C HamanoMar 17, 2026
  3. Toon ClaesMar 24, 2026
  4. replay: support replaying down from root commitToon Claes, Mar 24, 2026
  5. Junio C HamanoMar 24, 2026
  6. Christian CouderMar 25, 2026
  7. Ben KnobleMar 25, 2026
  8. Toon ClaesMar 25, 2026
  9. Toon ClaesMar 25, 2026
  10. Toon ClaesMar 25, 2026
  11. Junio C HamanoMar 27, 2026
  12. Christian CouderMar 31, 2026
  13. Junio C HamanoMar 31, 2026
  14. Toon ClaesApr 2, 2026
  15. Junio C HamanoApr 2, 2026
  16. Christian CouderApr 3, 2026
  17. Junio C HamanoMar 25, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.