Add "%w" to pretty formats, which rewraps the commit messagelog-rewrap
commit4c9414380cc00493956098e8ef5c7385933ceddf
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 10 Nov 2008 17:47:59 +0000 (10 18:47 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 25 Sep 2009 08:15:00 +0000 (25 10:15 +0200)
treee3b93593d07a5779142e615bb53057ac309e10ae
parent12a79e3c48ac98f829d8e1884b55f2b4b123f891
Add "%w" to pretty formats, which rewraps the commit message

Some repositories contain commit messages that are insanely long.
And not always is it an option to rewrite the commits with rewrapped
commit messages; just think of cvsimports or some such.

Now here is a remedy.

With "--pretty=format:%w(8,6,70)" you will get the commit messages
reformatted to width 70 where the first line has indent 8 and the
subsequent lines have indent 6.

The following command will output something similar to plain "git log
--color", except that the commit bodies will be rewrapped to fit inside
80 columns:

git log --pretty=format:'%C(yellow)commit %H%C(reset)
Author: %an <%ae>
Date: %ad

%w(4,4,80)'

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Documentation/pretty-formats.txt
pretty.c