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

From: Junio C Hamano <[email-masked]>
Date: Mon, 05 May 2014 16:02:34 -0700

Dave Bradley <[email-masked]> writes:

>> 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"