Missing trailing newline with git log --pretty=format

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Missing trailing newline with git log --pretty=format

From: Andreas Gruenbacher <hidden>
Date: 2016-06-15 22:46:25

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?

Thanks,
Andreas

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

From: Markus Heidelberg <hidden>
Date: 2016-06-15 22:46:25

Andreas Gruenbacher, 18.03.2009:
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

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

From: Andreas Gruenbacher <hidden>
Date: 2016-06-15 22:46:25

On Wednesday, 18 March 2009 22:56:43 Markus Heidelberg wrote:
Use tformat instead of format.
Hmm ... didn't know that, thanks. Now I wonder why anyone would ever want 
format instead of tformat ;)
Or better for a script use 

	$ git rev-list HEAD^^..HEAD
Much better, thanks.

Andreas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help