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"