* something like git-for-each-ref's --format for commits?
@ 2008-01-06 8:52 Brian Swetland
2008-01-06 9:05 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Brian Swetland @ 2008-01-06 8:52 UTC (permalink / raw)
To: git
I'm trying to obtain various information about commits from a script.
The --format option to git-for-each-ref would be perfect, except that
it only operates on refs, not arbitrary commit objects.
The --pretty=format:... option for git-log, etc has the annoying
property of giving you <unknown> instead of an empty string if an
item isn't example (say if you use %b on a commit with no body).
Am I missing some obvious solution here?
Thanks,
Brian
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: something like git-for-each-ref's --format for commits?
2008-01-06 8:52 something like git-for-each-ref's --format for commits? Brian Swetland
@ 2008-01-06 9:05 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2008-01-06 9:05 UTC (permalink / raw)
To: Brian Swetland; +Cc: git
On Sun, Jan 06, 2008 at 12:52:21AM -0800, Brian Swetland wrote:
> The --pretty=format:... option for git-log, etc has the annoying
> property of giving you <unknown> instead of an empty string if an
> item isn't example (say if you use %b on a commit with no body).
>
> Am I missing some obvious solution here?
I think --pretty=format: is what you are looking for. The "<unknown>"
behavior is fixed in the upcoming v1.5.4 (you get the empty string for
your example).
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-06 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 8:52 something like git-for-each-ref's --format for commits? Brian Swetland
2008-01-06 9:05 ` Jeff King
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 NNTP newsgroup(s).