Hi,

Interesting discussion. However, the example below of three-spaces between "%an" and "%ad" in the example below resulted in the
formatting of the output with the three spaces,  but no dq's.

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. (Yea right, these days its needs to be escaped. But haven't tried that.)

In summary so far, it would appear that the --pretty......... needs to be contained in double-quotes as a whole. This was the solution I applied to my problem.

In the discussions I've seen more information requested as to the arguments provided to the execution class. I solved this issue as I made it work by experiment. I format the argument as a whole and don't have the space. IE. "pretty=format:"name:%an%nauthor:%ad%n"".


Regards

-----Original Message----- From: Erik Faye-Lund
Sent: Friday, May 02, 2014 2:23 PM
To: Jonathan Nieder
Cc: Dave Bradley ; GIT Mailing-list ; msysGit
Subject: Re: [msysGit] Re: #178 parsing of pretty=format:"%an %ad" causes fatal: bad revision '%ad'

On Fri, May 2, 2014 at 7:23 PM, Jonathan Nieder <jrnie...@gmail.com> wrote:
(resending with the correct address for the Git for Windows developers.
Sorry for the noise.)
Hi Dave,

Dave Bradley wrote:

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

G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.x>git log --all "--pretty=format:"%an %ad"" -- pom.xml
fatal: bad revision '%ad'

On Linux, this example gets passed to git as six arguments:

        log
        --all
        --pretty=format:%an
        %ad
        --
        pom.xml


As does it on Windows.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to