[prev in list] [next in list] [prev in thread] [next in thread]
List: gnulib-bug
Subject: Re: [PATCH] gitlog-to-changelog: fix git-log invocation
From: "Dmitry V. Levin" <ldv () altlinux ! org>
Date: 2011-10-31 16:26:10
Message-ID: 20111031162610.GB29924 () altlinux ! org
[Download RAW message or body]
On Mon, Oct 31, 2011 at 05:11:28PM +0100, Jim Meyering wrote:
> Dmitry V. Levin wrote:
> > 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.
> ...
> > - my $since_date = '1970-01-01 UTC';
> > + my $since_date = '';
>
> No need for the initializer.
>
> > my $format_string = '%s%n%b%n';
> > my $append_dot = 0;
> > GetOptions
> > @@ -114,7 +114,12 @@ sub quoted_cmd(@)
> > 'append-dot' => \$append_dot,
> > ) or usage 1;
> >
> > - my @cmd = (qw (git log --log-size), "--since=$since_date",
> > + if ($since_date)
> > + {
> > + unshift(@ARGV, "--since=$since_date");
> > + }
>
> The above would fail to process any specified value that evaluates to 0.
> Testing for definedness avoids that nit,
> and I prefer the two-line construct to the 4-line one:
>
> defined $since_date
> and unshift @ARGV, "--since=$since_date";
Thanks for corrections. Now gitlog-to-changelog without --since will
hopefully work 24 hours a day. :)
--
ldv
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic