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

2014-05-05 Thread Junio C Hamano
Dave Bradley dbradl...@bell.net writes:

 Original #178 content
 G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.xgit log --all
 --pretty=format:%an%ad -- pom.xml
 Mon Nov 23 03:09:17 2009 +
 Mon Nov 23 02:42:24 2009 +

 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

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


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

2014-05-04 Thread Dave Bradley

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.xgit log --all 
--pretty=format:%an%ad -- pom.xml

 Mon Nov 23 03:09:17 2009 +
 Mon Nov 23 02:42:24 2009 +


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.xgit 
log --all --pretty=format:%an %ad -- pom.xml

  Mon Nov 23 03:09:17 2009 +
  Mon Nov 23 02:42:24 2009 +

G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.xgit 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


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

2014-05-02 Thread Erik Faye-Lund
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.xgit log --all 
 --pretty=format:%an %ad -- pom.xml
   Mon Nov 23 03:09:17 2009 +
   Mon Nov 23 02:42:24 2009 +

 G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.xgit 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