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

Re: [msysGit] Re: #178 parsing of pretty=format:"%an %ad" causes fatal: bad revision '%ad'

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2014, 23:02 UTC
Message-ID
<xmqqtx9396d1.fsf@gitster.dls.corp.google.com>
In-Reply-To
<BLU0-SMTP387BC836A8719897DD84B79F4D0@phx.gbl>
Dave Bradley <dbradley2@bell.net> writes:
Show 8 quoted lines
>> Original #178 content
>> G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.x>git log --all
>> "--pretty=format:"%an"    "%ad"" -- pom.xml
>>xxxx xxxx    Mon Nov 23 03:09:17 2009 +0000
>>xxxx xxxx    Mon Nov 23 02:42:24 2009 +0000
>
> This added to my confusion as by right dq within dq should be
> formatted.

I do not see any dq within dq here. Perhaps you need to count again to see which one pairs with which one.

What I see are these three strings concatenated together:
        --pretty=format: (which does not need any dq)
        %an"   "%ad     (the dq protects 3 SPs inside)
                        (an empty string inside the final dq pair)

So the single parameter that begins with --pretty given to "git log" is exactly the same as what is inside the single dq pair in the following:

	"--pretty=format:%an   %ad"
A more conventional way to spell it may however be one of:
	--pretty=format:"%an   %ad"
	--pretty="format:%an   %ad"
Previous: Dave Bradley
Message 8 of 8 in “#178 parsing of pretty=format:"%an %ad" causes fatal: bad revision '%ad'”
  1. Dave BradleyMay 2, 2014
  2. Erik Faye-LundMay 2, 2014
  3. Junio C HamanoMay 2, 2014
  4. Jonathan NiederMay 2, 2014
  5. Jonathan NiederMay 2, 2014
  6. Erik Faye-LundMay 2, 2014
  7. Dave BradleyMay 4, 2014
  8. Junio C HamanoMay 5, 2014

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.