From: Junio C Hamano Date: Tue, 06 Mar 2012 18:31:12 GMT Subject: Re: Bug: pull --rebase with é in name Message-ID: <7vmx7ttwcv.fsf@alter.siamese.dyndns.org> In-Reply-To: <87399mazxs.fsf@thomas.inf.ethz.ch> Thomas Rast writes: >> git show -s --format=' >> GIT_AUTHOR_NAME=%(sq-begin)%an%(sq-end) >> GIT_AUTHOR_EMAIL=%(sq-begin)%ae%(sq-end) >> ' > > How about something along the lines of %Q(%an) instead? Though at least > implementation-wise, it should be possible to make %'%an%' work, too, > which would be rather cute. It would be also less error prone from end user's point of view if your closing token is not ")" (as in %Q(%an)) but percent-something, e.g. %<%an%>, %`%an%', or %'%an%'. The way to quote a string that happens to be the same as closing token you want to put in the quoted string would be more obvious (e.g. ID=%Q(%ae (%an%29) is a bit hard to read for ID='gitster@pobox.com (J C H)'). ID=%'%ae (%an)%' As I do not expect these things to nest (do we want to be able to formulate a string that can be eval'ed twice???), using the same string for both opening and closing token is fine by me.