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

Re: [PATCH v3 0/3] replay: make atomic ref updates the default

From
Siddharth Asthana <siddharthasthana31@gmail.com>
Date
Oct 15, 2025, 05:05 UTC
Message-ID
<92f9bdec-28ba-45ba-a111-24963d0a300a@gmail.com>
In-Reply-To
<xmqqtt01w5jh.fsf@gitster.g>
On 15/10/25 02:43, Junio C Hamano wrote:
Show 18 quoted lines
> When merged to 'seen', this breaks t0450; from the way the test
> breaks, I suspect that it has the same breakage if the topic gets
> tested standalone.
>
>      $ make
>      $ cd t
>      $ sh t0450-txt-doc-vs-help.sh -i -v
>      ...
>      --- adoc        2025-10-14 21:02:48.680184914 +0000
>      +++ help        2025-10-14 21:02:48.688184867 +0000
>      @@ -1,2 +1 @@
>      -(EXPERIMENTAL!) git replay ([--contained] --onto <newbase> | --advance <branch>)
>      -           [--update-refs[=<mode>]] <revision-range>...
>      +(EXPERIMENTAL!) git replay ([--contained] --onto <newbase> | --advance <branch>) [--update-refs[=<mode>]] <revision-range>...
>      not ok ...
>
> In short, "git replay -h" and the initial part of "git replay --help"
> must match.

Thanks for catching this! I actually noticed the CI was failing on documentation checks while testing on GitLab before sending v3 to the list. I initially thought it was an AsciiDoc line continuation issue and suggested adding a `+` at the end of the line, but Christian pointed out that the real issue was likely the mismatch between the synopsis and the help output from the command itself.

I split the SYNOPSIS across two lines in the documentation for readability:
     (EXPERIMENTAL!) 'git replay' ([--contained] --onto <newbase> | 
--advance <branch>)
             [--update-refs[=<mode>]] <revision-range>...

But didn't update the usage string in builtin/replay.c to match. Your patch adding "\n" and the proper indentation is exactly what's needed:

     "(EXPERIMENTAL!) git replay ([--contained] --onto <newbase> | 
--advance <branch>)\n"
     "\t\t[--update-refs[=<mode>]] <revision-range>..."

I will squash this into the next version. I should have run t0450 locally after Christian's hint about the synopsis check - I was focused on t3650 and the functional tests but missed this formatting requirement.

Thanks, Siddharth

Show 22 quoted lines
>
> Minimally you'd need to squash in something like the following
> patch.  Alternatively, you could match the documentation page (which
> is shown by "git replay --help") to match what "git replay -h" gives.
>
>
>   builtin/replay.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git i/builtin/replay.c w/builtin/replay.c
> index 3c618bf100..d0f0492790 100644
> --- i/builtin/replay.c
> +++ w/builtin/replay.c
> @@ -330,7 +330,7 @@ int cmd_replay(int argc,
>   
>   	const char *const replay_usage[] = {
>   		N_("(EXPERIMENTAL!) git replay "
> -		   "([--contained] --onto <newbase> | --advance <branch>) "
> +		   "([--contained] --onto <newbase> | --advance <branch>)\n"
>   		   "[--update-refs[=<mode>]] <revision-range>..."),
>   		NULL
>   	};
Previous: Junio C Hamano
Message 8 of 8 in “replay: make atomic ref updates the default”
  1. 0/3 replay: make atomic ref updates the defaultSiddharth Asthana, Oct 13, 2025
  2. 1/3 replay: use die_for_incompatible_opt2() for option validationSiddharth Asthana, Oct 13, 2025
  3. Junio C HamanoOct 13, 2025
  4. 2/3 replay: make atomic ref updates the default behaviorSiddharth Asthana, Oct 13, 2025
  5. 3/3 replay: add replay.defaultAction config optionSiddharth Asthana, Oct 13, 2025
  6. Siddharth AsthanaOct 13, 2025
  7. Junio C HamanoOct 14, 2025
  8. Siddharth AsthanaOct 15, 2025

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.