git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Jeff King
Message 17 of 17 in “Bug: pull --rebase with é in name”
  1. René HaberMar 5, 2012
  2. Jeff KingMar 5, 2012
  3. Thomas RastMar 5, 2012
  4. René HaberMar 5, 2012
  5. Jeff KingMar 5, 2012
  6. Jakub NarebskiMar 5, 2012
  7. René HaberMar 5, 2012
  8. Thomas RastMar 5, 2012
  9. René HaberMar 5, 2012
  10. Jeff KingMar 5, 2012
  11. Thomas RastMar 5, 2012
  12. Jeff KingMar 5, 2012
  13. Junio C HamanoMar 5, 2012
  14. Jeff KingMar 6, 2012
  15. Thomas RastMar 6, 2012
  16. Jeff KingMar 6, 2012
  17. Junio C HamanoMar 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.