Re: Bug: pull --rebase with é in name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 6, 2012, 18:31 UTC
- Message-ID
- <7vmx7ttwcv.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <87399mazxs.fsf@thomas.inf.ethz.ch>
Thomas Rast <trast@inf.ethz.ch> writes:
Show 8 quoted lines
>> 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.