Subject: Re: [PATCH v3 3/8] rebase-interactive: update 'merge' description

From: Junio C Hamano <[email-masked]>
Date: Tue, 28 Jun 2022 14:00:50 -0700

"Derrick Stolee via GitGitGadget" <[email-masked]> writes:

> From: Derrick Stolee <[email-masked]>
>
> The 'merge' command description for the todo list documentation in an
> interactive rebase has multiple lines. The lines other than the first
> one start with dots ('.') while the similar multi-line documentation for
> 'fixup' does not.
>
> The 'merge' command was documented when interactive rebase was first
> ported to C in 145e05ac44b (rebase -i: rewrite append_todo_help() in C,
> 2018-08-10). These dots might have been carried over from the previous
> shell implementation.

The text indeed does come literally from the block removed by that
commit.  I wondered if the shell "gettext" in git-i18n.sh had some
magic in it, but it does not seem to have anything, and po/git.pot
around that time has these lines with leading dots, so I suspect
that they were quite deliberately added, not for the reasons of
formatting machinery (e.g. preventing somebody in the dataflow from
losing leading indentation), but to show them to the end users.

Unfortunately, the offending commit 4c68e7dd (sequencer: introduce
the `merge` command, 2018-04-25) does not justify them X-<.

> Looking at the output in an editor, my personal opinion is that the dots
> are unnecessary and noisy. Remove them now before adding more commands
> with multi-line documentation.

I personally do not mind having them in the UI, but I can also be
happy to see them go.  It is unlikely that any program is consuming
these strings, so I would say this is a fairly safe clean-up.

> Signed-off-by: Derrick Stolee <[email-masked]>
> ---
>  rebase-interactive.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/rebase-interactive.c b/rebase-interactive.c
> index 87649d0c016..22394224faa 100644
> --- a/rebase-interactive.c
> +++ b/rebase-interactive.c
> @@ -54,9 +54,9 @@ void append_todo_help(int command_count,
>  "l, label <label> = label current HEAD with a name\n"
>  "t, reset <label> = reset HEAD to a label\n"
>  "m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]\n"
> -".       create a merge commit using the original merge commit's\n"
> -".       message (or the oneline, if no original merge commit was\n"
> -".       specified); use -c <commit> to reword the commit message\n"
> +"        create a merge commit using the original merge commit's\n"
> +"        message (or the oneline, if no original merge commit was\n"
> +"        specified); use -c <commit> to reword the commit message\n"
>  "\n"
>  "These lines can be re-ordered; they are executed from top to bottom.\n");
>  	unsigned edit_todo = !(shortrevisions && shortonto);