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

git log --summary outputs extra newlines inconsistently

From
Anders Kaseorg <andersk@ksplice.com>
Date
Feb 3, 2011, 23:33 UTC
Message-ID
<alpine.DEB.2.02.1102021842550.12561@dr-wily.mit.edu>

‘git log --summary’ seems to output a newline after every non-merge commit.

  $ git log --summary --pretty=format:'%h %s'
  3c0eee3 Linux 2.6.37
  
  65f4288 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
  9fc3bbb ipv4/route.c: respect prefsrc for local routes
  
  8a87694 remove trim_fs method from Documentation/filesystems/Locking
  
  989d873 Merge master.kernel.org:/home/rmk/linux-2.6-arm
  d9a1abe arch/mn10300/kernel/irq.c: fix build
  
  867c202 ima: fix add LSM rule bug
  …
Oddly, those newlines show up even with -z!
  $ git log --summary --pretty=format:%h -z
  3c0eee3
  ^@65f4288^@9fc3bbb
  ^@8a87694
  ^@989d873^@d9a1abe
  ^@867c202
  …
This makes the output annoying to parse in both cases.
(I’m using Git 1.7.4-rc2.)
Anders
Next: Anders Kaseorg
Message 1 of 2 in “git log --summary outputs extra newlines inconsistently”
  1. Anders KaseorgFeb 3, 2011
  2. Anders KaseorgFeb 4, 2011

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.