* Format for %d includes unwanted preceding space
@ 2016-10-06 9:22 Ravi (Tom) Hale
2016-10-06 18:49 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Ravi (Tom) Hale @ 2016-10-06 9:22 UTC (permalink / raw)
To: git
The log --format="%d" includes preceding space:
$ git log -n1 --format="XX%dXX" HEAD
XX (HEAD -> master)XX
I know of no other %<token> that is output in this way.
Is there a way of removing this preceding space through the format
string, or will it need to be a code change?
--
Tom Hale
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Format for %d includes unwanted preceding space
2016-10-06 9:22 Format for %d includes unwanted preceding space Ravi (Tom) Hale
@ 2016-10-06 18:49 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2016-10-06 18:49 UTC (permalink / raw)
To: Ravi (Tom) Hale; +Cc: git
"Ravi (Tom) Hale" <ravi@hale.ee> writes:
> The log --format="%d" includes preceding space:
>
> $ git log -n1 --format="XX%dXX" HEAD
> XX (HEAD -> master)XX
>
> I know of no other %<token> that is output in this way.
That is primarily because %d predates %[-+ ]<placeholder> mechanism,
I think. It is too late to redefine what "%d" means and force all
users to update their script to use "% d" instead, unfortunately.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-06 18:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 9:22 Format for %d includes unwanted preceding space Ravi (Tom) Hale
2016-10-06 18:49 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).