X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fgitlog-to-changelog;h=45597041e0c3ca07a2b41e5f1470573dd98520d7;hb=208e667b5f8c696e723da34171fbaa6f01246f3b;hp=1cc53eb7c1036ce93c77c4e0830cf573d0dd928b;hpb=1a91d78bf437db3d5fb37a6deace2bd928f71c0b;p=gnulib.git diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 1cc53eb7c..45597041e 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -1,13 +1,15 @@ -#!/usr/bin/perl +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2009-06-04 08:53'; # UTC +my $VERSION = '2009-10-30 13:46'; # 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 # do its job. Otherwise, update this string manually. -# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2008-2011 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -60,6 +62,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 +101,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"); @@ -174,6 +181,7 @@ sub quoted_cmd(@) } # Local Variables: +# mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '"