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

Re: [PATCH] Allow custom "comment char"

From
Ralf Thielow <ralf.thielow@gmail.com>
Date
Jan 16, 2013, 08:17 UTC
Message-ID
<CAN0XMOJPgGXUeOBC=ubO0d7NweEihJvQbf2O6wxazh4juLi02g@mail.gmail.com>
In-Reply-To
<7vmww9zlwj.fsf@alter.siamese.dyndns.org>
2013/1/16 Junio C Hamano <gitster@pobox.com>:
Show 26 quoted lines
>>> diff --git a/git-submodule.sh b/git-submodule.sh
>>> index 22ec5b6..1b8d95f 100755
>>> --- a/git-submodule.sh
>>> +++ b/git-submodule.sh
>>> @@ -975,13 +975,19 @@ cmd_summary() {
>>>              echo
>>>      done |
>>>      if test -n "$for_status"; then
>>> +            comment_char=`git config core.commentchar`
>>> +            if [ ! -n "$comment_char" ]; then
>>> +                    comment_char='#'
>>> +            elif [ ${#comment_char} -gt 1 ]; then
>>
>> Not portable, I think.
>>
>>> +            echo "$comment_char"
>>> +            sed -e "s|^|$comment_char |" -e "s|^$comment_char $|$comment_char|"
>>
>> Can $comment_char be a '|'?
>
> I think it may be the easiest to teach one of the pure-helper
> commands, e.g. "git stripspace", to do this kind of thing for you
> with a new option.
>
> To summarize, along the lines of the attached patch (on top of
> jc/custom-comment-char topic).

Very good idea. I'll integrate. Thanks

Previous: Junio C HamanoNext: Ralf Thielow
Message 12 of 18 in “commit: make default of "cleanup" option configurable”
  1. commit: make default of "cleanup" option configurableRalf Thielow, Jan 8, 2013
  2. Junio C HamanoJan 8, 2013
  3. Jonathan NiederJan 9, 2013
  4. Ralf ThielowJan 9, 2013
  5. Jonathan NiederJan 9, 2013
  6. Junio C HamanoJan 9, 2013
  7. Junio C HamanoJan 9, 2013
  8. Re* [PATCH] commit: make default of "cleanup" option configurableJunio C Hamano, Jan 10, 2013
  9. Allow custom "comment char"Ralf Thielow, Jan 15, 2013
  10. Junio C HamanoJan 15, 2013
  11. Junio C HamanoJan 16, 2013
  12. Ralf ThielowJan 16, 2013
  13. Allow custom "comment char"Ralf Thielow, Jan 16, 2013
  14. Junio C HamanoJan 16, 2013
  15. Jens LehmannJan 16, 2013
  16. [PATCHv2] commit: make default of "cleanup" option configurableRalf Thielow, Jan 9, 2013
  17. Junio C HamanoJan 10, 2013
  18. [PATCHv3] commit: make default of "cleanup" option configurableRalf Thielow, Jan 10, 2013

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.