git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: something like git-for-each-ref's --format for commits?

From
Jeff King <peff@peff.net>
Date
Jan 6, 2008, 09:05 UTC
Message-ID
<20080106090507.GA10965@coredump.intra.peff.net>
In-Reply-To
<20080106085221.GA1729@bulgaria.corp.google.com>
On Sun, Jan 06, 2008 at 12:52:21AM -0800, Brian Swetland wrote:
Show 5 quoted lines
> 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
Previous: Brian Swetland
Message 2 of 2 in “something like git-for-each-ref's --format for commits?”
  1. Brian SwetlandJan 6, 2008
  2. Jeff KingJan 6, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.