Re: [PATCH 3/3] rebase -i: handle core.commentChar=auto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 21.11.2016 um 19:40 schrieb Junio C Hamano:
Johannes Sixt <j6t@xxxxxxxx> writes:
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?

Heh. I tested a few variations, but not this one. Make it

 	comment_char=${comment_char%"${comment_char#?}"}

;)

-- Hannes




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]