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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 1, 2023, 04:59 UTC
Message-ID
<xmqqlebit6fx.fsf@gitster.g>
In-Reply-To
<10598a56d64f5c2b4d8d05d7e7b09a18ef254f88.1698728953.git.gitgitgadget@gmail.com>
"Tony Tung via GitGitGadget" <gitgitgadget@gmail.com> 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"
Show 5 quoted lines
> From: Tony Tung <tonytung@merly.org>
>
> 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.

Show 5 quoted lines
> -			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.
Previous: Phillip WoodNext: Tony Tung via GitGitGadget
Message 12 of 18 in “sequencer: remove use of comment character”
  1. sequencer: remove use of comment characterTony Tung via GitGitGadget, Oct 30, 2023
  2. Junio C HamanoOct 30, 2023
  3. Elijah NewrenOct 30, 2023
  4. Junio C HamanoOct 30, 2023
  5. Tony TungOct 31, 2023
  6. Tony TungOct 31, 2023
  7. Junio C HamanoOct 31, 2023
  8. Elijah NewrenOct 31, 2023
  9. 0/2 sequencer: remove use of hardcoded comment charTony Tung via GitGitGadget, Oct 31, 2023
  10. 1/2 sequencer: remove use of comment characterTony Tung via GitGitGadget, Oct 31, 2023
  11. Phillip WoodOct 31, 2023
  12. Junio C HamanoNov 1, 2023
  13. 2/2 sequencer: fix remaining hardcoded comment charTony Tung via GitGitGadget, Oct 31, 2023
  14. Phillip WoodOct 31, 2023
  15. Elijah NewrenOct 31, 2023
  16. Phillip WoodOct 31, 2023
  17. Junio C HamanoNov 1, 2023
  18. Elijah NewrenNov 1, 2023

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.