# HG changeset patch # User Dmitry V. Levin # Date 1320076612 -14400 # Node ID 61644fa37fbe782e5393c1d3195f3b342d498862 # Parent 8bcf649752563b86befed5a410aaaa12ab36228c gitlog-to-changelog: fix git-log invocation git-log mishandles date strings before 1970-01-01 UTC, and there is no use to specify --since=1970-01-01 by default anyway. * build-aux/gitlog-to-changelog: By default, when no --since option was given, do not specify explicit --since option to git-log. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-10-31 Dmitry V. Levin + + gitlog-to-changelog: fix git-log invocation. + git-log mishandles date strings before 1970-01-01 UTC, and there is + no use to specify --since=1970-01-01 by default anyway. + * build-aux/gitlog-to-changelog: By default, when no --since option + was given, do not specify explicit --since option to git-log. + 2011-10-30 Dmitry V. Levin gitlog-to-changelog: new option --append-dot. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,7 +3,7 @@ if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2011-10-31 07:45'; # UTC +my $VERSION = '2011-10-31 16:06'; # 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 @@ -102,7 +102,7 @@ } { - my $since_date = '1970-01-01 UTC'; + my $since_date; my $format_string = '%s%n%b%n'; my $append_dot = 0; GetOptions @@ -114,7 +114,10 @@ 'append-dot' => \$append_dot, ) or usage 1; - my @cmd = (qw (git log --log-size), "--since=$since_date", + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + my @cmd = (qw (git log --log-size), '--pretty=format:%ct %an <%ae>%n%n'.$format_string, @ARGV); open PIPE, '-|', @cmd or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n"