On 04/20/2009 10:00 AM, Dan Winship wrote:
Alexander Larsson wrote:On Mon, 2009-04-20 at 09:06 -0400, Behdad Esfahbod wrote:I like the more verbose format clearly showing which changes are big and which are small.Well, I don't really disagree that its nice to know. However, all such info is readily availible in gitRight. People who want the full git history are also going to want to have a full checkout handy, and they can just use "git log" with whatever flags they like. Here's something to generate a fairly traditional-looking ChangeLog (though working on the assumption that you're doing the subject vs body split in your git commit messages): git log --date=short --pretty=format:"@@@@%cd %an<%ae>%n%n%s%n%n%b" | perl -ne 'if (/^\s*$/) { if (!$blank) { print; $blank=1; } } else {$blank=0; if (!s/^@@@@//&& !/^\t/) { print "\t"; } print; }'
I'd rather use awk. Listing of files is also desired, since old ChangeLog files contained those.
behdad
%cd is commit date, %an is Author name and %ae is Author email. The perl part indents every commit description line that doesn't already start with a tab, and removes duplicate blank lines. Assuming the lines were wrapped to 72 columns to start with, this will make them look too long, but won't actually cause anything new to wrap. -- Dan