Subject: Re: [PATCH v2 1/2] sequencer: remove use of comment character

From: Junio C Hamano <[email-masked]>
Date: Wed, 01 Nov 2023 13:59:14 +0900

"Tony Tung via GitGitGadget" <[email-masked]> writes:

> Subject: Re: [PATCH v2 1/2] sequencer: remove use of comment character

The patch does not seem to be doing that, though.  It may have
removed '#' in "# Ref", but still uses comment_line_char, so it does
not remove use at all (and we do not want to, of course).

"use the core.commentchar consistently"

> From: Tony Tung <[email-masked]>
>
> Instead of using the hardcoded `# `, use the
> user-defined comment_line_char.  Adds a test
> to prevent regressions.

Overly short lines.

The readers cannot tell where in the output the hardcoded # appears
with the above description. I am guessing that it is in comments in
the sequencer/todo file that mark commits that are at the tip of
branches that are checked out, but there may be more specific
circumstances in which the comment is used, like "when rebase -i is
used with the --update-refs option", if so that also need to be told
to the readers.

Describe the condition well enough so that readers can easily see
the defect the patch attempts to fix.

> -			strbuf_addf(ctx->buf, "# Ref %s checked out at '%s'\n",
> -				    decoration->name, path);
> +			strbuf_commented_addf(ctx->buf, comment_line_char,
> +					      "Ref %s checked out at '%s'\n",
> +					      decoration->name, path);

OK.