X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=build-aux%2Fgitlog-to-changelog;h=a0f8a088e2cfa9a832aa5de840e358557405f59b;hb=3e08d3f9b9b5920385529d4a981f052bbcc0a5a7;hp=1cc53eb7c1036ce93c77c4e0830cf573d0dd928b;hpb=1a91d78bf437db3d5fb37a6deace2bd928f71c0b;p=gnulib.git diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 1cc53eb7c..a0f8a088e 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -1,7 +1,7 @@ #!/usr/bin/perl # Convert git log output to ChangeLog format. -my $VERSION = '2009-06-04 08:53'; # UTC +my $VERSION = '2009-08-12 16:49'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -60,6 +60,9 @@ OPTIONS: --since=DATE convert only the logs since DATE; the default is to convert all log entries. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' --help display this help and exit --version output version information and exit @@ -96,15 +99,17 @@ sub quoted_cmd(@) { my $since_date = '1970-01-01 UTC'; + my $format_string = '%s%n%b%n'; GetOptions ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, + 'format=s' => \$format_string, ) or usage 1; my @cmd = (qw (git log --log-size), "--since=$since_date", - '--pretty=format:%ct %an <%ae>%n%n%s%n%b%n', @ARGV); + '--pretty=format:%ct %an <%ae>%n%n'.$format_string, @ARGV); open PIPE, '-|', @cmd or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" . "(Is your Git too old? Version 1.5.1 or later is required.)\n");