Re: [PATCH 3/3] rebase -i: handle core.commentChar=auto
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 21, 2016, 18:40 UTC
- Message-ID
- <xmqq37ikk762.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <975c0002-8afe-efa6-d967-72f2a0d21169@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
> comment_char is a command? Did you mean > > comment_char=$(echo "$comment_char" | cut -c1)
;-)
Show 5 quoted lines
> It could be written without forking a process:
>
> comment_char=${comment_char%${comment_char#?}}
>
> (aka "remove from the end what remains after removing the first character")Hopefully nobody would include any glob metacharacters in there, e.g. "core.commentchar='=*'", which would break that?