From: Ralf Thielow Date: Wed, 16 Jan 2013 08:17:40 GMT Subject: Re: [PATCH] Allow custom "comment char" Message-ID: In-Reply-To: <7vmww9zlwj.fsf@alter.siamese.dyndns.org> 2013/1/16 Junio C Hamano : >>> 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