]> git.ipfire.org Git - thirdparty/git.git/commit - log-tree.c
pretty-formats: add 'format:<string>'
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Fri, 23 Feb 2007 00:35:03 +0000 (01:35 +0100)
committerJunio C Hamano <junkio@cox.net>
Fri, 23 Feb 2007 05:03:41 +0000 (21:03 -0800)
commite52a5de45ab8b61bdddf48a466cb3388b38ad7a4
treecfb6f12d6071968b55d07120745e5b10333ddad6
parent437b1b20df4b356c9342dac8d38849f24ef44f27
pretty-formats: add 'format:<string>'

With this patch,

$ git show -s \
--pretty=format:'  Ze komit %h woss%n  dunn buy ze great %an'

shows something like

  Ze komit 04c5c88 woss
  dunn buy ze great Junio C Hamano

The supported placeholders are:

'%H': commit hash
'%h': abbreviated commit hash
'%T': tree hash
'%t': abbreviated tree hash
'%P': parent hashes
'%p': abbreviated parent hashes
'%an': author name
'%ae': author email
'%ad': author date
'%aD': author date, RFC2822 style
'%ar': author date, relative
'%at': author date, UNIX timestamp
'%cn': committer name
'%ce': committer email
'%cd': committer date
'%cD': committer date, RFC2822 style
'%cr': committer date, relative
'%ct': committer date, UNIX timestamp
'%e': encoding
'%s': subject
'%b': body
'%Cred': switch color to red
'%Cgreen': switch color to green
'%Cblue': switch color to blue
'%Creset': reset color
'%n': newline

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/pretty-formats.txt
commit.c
commit.h
log-tree.c