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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I’m very new to ‘git’ github. I reported the #178 issue in github and the issue has been closed, I believe this means no further discussion.

There are a three additional comments, thank you to the contributors. The advise was to discuss upstream which meant nothing to me (again thanks to another contributor for clarification).

Summary
------------
The issue reported is (in my opinion) a defect in argument processing (happens on Windows and Linux (as per another contributor)).

The issue (in my opinion) is a defect for argument processing by Git. The decision (agreement or otherwise) I guess is for this upstream discussion.

I appreciate the open-source git and its usage to the community. But this is owned by the discussion group and I doubt my involvement is wanted. So this will be my last communication on this issue.

Context
----------
Over many years, I’ve used command-line on Unix/Linux/Windows in both hobby and professional modes. In the latter case the processing of arguments with spaces has often been the cause of defects (none expected behaviour) for newly introduced products.

I’ve found no documentation about the pretty=format behaviour as described by the #178 issue. Also, there are many (but incomplete) google-it second-hand documents(?) about. So a document fix in the internet age is not necessarily the approach to solve an issue, as all those google-it items create fog.

For this issue I was processing a git command to run in a GUI and happened upon it. The GUI (original design by me) allows interfacing with CVS, SVN, HG and maybe now GIT in a similar manner. The GUI holds the interfacing and access information and concatenates it onto the VCS command/sub-commands as appropriate for a request. Thus, the concatenated VCS request may be processed for copy-paste onto a command line window/terminal or (for my GUI) executed via a programming language’s command-line-execution class/function (Perl, Java, C,.....).

With the argument being further processed within git, it behaves in a manner that wasn’t expected.


Thx
Dave

the Issue as reported


Getting a fatal failure when using the following --pretty=format:"%an %ad" via a programmed execution from within a programming language. (Java using the execution capabilities puts the ' --pretty=format:"%an %ad" ' as an argument). This is reproduced on a Windows command-line entry by putting double-quotes around the argument. (see below for various examples of pass, fail and testing around).

The git argument parser appears to perform a split on spaces within the arguments passed to it also. This is not a normal behaviour for any parsing. Also, the split is happening within a string quote, it would appear ("%an %ad").
Even tried %20 to represent the space.

Thx

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'

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'

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




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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]