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

Re: [PATCH v3] sequencer: use configured comment character

From
Daniel Harding <dharding@living180.net>
Date
Jul 16, 2018, 18:49 UTC
Message-ID
<66ce6f94-49ae-618e-bf6c-43a0f15bb752@living180.net>
In-Reply-To
<nycvar.QRO.7.76.6.1807161758560.71@tvgsbejvaqbjf.bet>
Hi Johannes,
On Mon, 16 Jul 2018 at 18:59:03 +0300, Johannes Schindelin wrote:
Show 30 quoted lines
> Hi Aaron,
> 
> On Mon, 16 Jul 2018, Aaron Schrab wrote:
>>
>> Looking into that a bit further, it does seem like my explanation above
>> was incorrect.  Here's another attempt to explain why setting
>> core.commentChar=auto isn't a problem for this change.
>>
>> 8< -----
>>
>> Use the configured comment character when generating comments about
>> branches in a todo list.  Failure to honor this configuration causes a
>> failure to parse the resulting todo list.
>>
>> Setting core.commentChar to "auto" will not be honored here, and the
>> previously configured or default value will be used instead. But, since
>> the todo list will consist of only generated content, there should not
>> be any non-comment lines beginning with that character.
> 
> How about this instead?
> 
> 	If core.commentChar is set to "auto", the intention is to
> 	determine the comment line character from whatever content is there
> 	already.
> 
> 	As the code path in question is the one *generating* the todo list
> 	from scratch, it will automatically use whatever core.commentChar
> 	has been configured before the "auto" (and fall back to "#" if none
> 	has been configured explicitly), which is consistent with users'
> 	expectations.

Honestly, the above still doesn't read clearly to me. I've take a stab at it myself - let me know what you think:

     If core.commentChar is set to "auto", the comment_line_char global
     variable will be initialized to '#'.  The only time
     comment_line_char gets changed to an automatic value is when the
     prepare_to_commit() function (in commit.c) calls
     adjust_comment_line_char().  This does not happen when generating
     the todo list, so '#' will be used as the comment character in the
     todo list if core.commentChar is set to "auto".
Cheers,
Daniel Harding
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 23 of 24 in “Fix --rebase-merges with custom commentChar”
  1. 0/2 Fix --rebase-merges with custom commentCharDaniel Harding, Jul 8, 2018
  2. 1/2 sequencer: fix --rebase-merges with custom commentCharDaniel Harding, Jul 8, 2018
  3. 2/2 t3430: update to test with custom commentCharDaniel Harding, Jul 8, 2018
  4. brian m. carlsonJul 8, 2018
  5. Johannes SchindelinJul 9, 2018
  6. Junio C HamanoJul 9, 2018
  7. Daniel HardingJul 9, 2018
  8. Johannes SchindelinJul 9, 2018
  9. Junio C HamanoJul 9, 2018
  10. Daniel HardingJul 9, 2018
  11. Johannes SchindelinJul 9, 2018
  12. Daniel HardingJul 10, 2018
  13. Johannes SchindelinJul 10, 2018
  14. Daniel HardingJul 10, 2018
  15. Johannes SchindelinOct 2, 2018
  16. brian m. carlsonJul 9, 2018
  17. Johannes SchindelinJul 9, 2018
  18. Daniel HardingJul 10, 2018
  19. Aaron SchrabJul 12, 2018
  20. Junio C HamanoJul 12, 2018
  21. sequencer: use configured comment characterAaron Schrab, Jul 16, 2018
  22. Johannes SchindelinJul 16, 2018
  23. Daniel HardingJul 16, 2018
  24. Johannes SchindelinJul 17, 2018

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.