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

[BUG] --pretty=format does not work ok with rev-list

From
Kk0001 <gnuk0001@gmail.com>
Date
Apr 12, 2008, 20:40 UTC
Message-ID
<1208032825.30817.15.camel@k0001>

Hello list, my name is Renzo Carbonara and I'm new here in the git neighborhood.

Now back to business, when using --pretty=format:some_format with git rev-list, an additional non-requested line is printed before every commit ("commit <sha1_id>"). Example:

git rev-list output (BAD):

k@k0001 ~/linux-2.6 $ git rev-list -2 --pretty=format:"%H: %cn" master commit f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed: Linus Torvalds commit 44cad261025c04327fd7e847a7088fd3031b0c3e 44cad261025c04327fd7e847a7088fd3031b0c3e: Linus Torvalds

git log output (GOOD):

k@k0001 ~/linux-2.6 $ git log -2 --pretty=format:"%H: %cn" master f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed: Linus Torvalds 44cad261025c04327fd7e847a7088fd3031b0c3e: Linus Torvalds

this was tested with versions:
 - 1.5.3.7
 - 4cdda2b895dfb6ba084e3952cbf4274a6a2e0338
Cheers,
Renzo Carbonara
Next: Jörg Sommer
Message 1 of 3 in “[BUG] --pretty=format does not work ok with rev-list”
  1. k0001Apr 12, 2008
  2. Jörg SommerApr 25, 2008
  3. Junio C HamanoApr 25, 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.