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

Re: Missing trailing newline with git log --pretty=format

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Mar 18, 2009, 21:56 UTC
Message-ID
<200903182256.43817.markus.heidelberg@web.de>
In-Reply-To
<200903182223.58800.agruen@suse.de>
Andreas Gruenbacher, 18.03.2009:
Show 13 quoted lines
> Hello,
> 
> with the latest version of git from right now (e986ceb):
> 
> While trying to get a reverse list of commit ids, I noticed that git log 
> prints newlines between commits, but not at the end. This results in two 
> joined lines with:
> 
> 	$ git log --pretty=format:%h HEAD^^..HEAD | tac
> 	aab3b9a7d4e3a7
> 	e986ceb
> 
> Any chance of getting this fixed?
Use tformat instead of format. Or better for a script use
	$ git rev-list HEAD^^..HEAD

But somehow --abbrev or --abbrev-commit don't work. Am I doing something wrong?

Markus
Previous: Andreas GruenbacherNext: Andreas Gruenbacher
Message 2 of 4 in “Missing trailing newline with git log --pretty=format”
  1. Andreas GruenbacherMar 18, 2009
  2. Markus HeidelbergMar 18, 2009
  3. Andreas GruenbacherMar 18, 2009
  4. Junio C HamanoMar 18, 2009

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.