Re: [PATCH 5/6] Git.pm: teach "ident" to query explicitness
- From
Jeff King <peff@peff.net>
- Date
- Nov 13, 2012, 17:25 UTC
- Message-ID
- <20121113172508.GA12951@sigill.intra.peff.net>
- In-Reply-To
- <20121113172300.GA16241@ftbfs.org>
On Tue, Nov 13, 2012 at 09:23:00AM -0800, Matt Kraai wrote:
Show 11 quoted lines
> Minor nits: > > On Tue, Nov 13, 2012 at 11:53:20AM -0500, Jeff King wrote: > > @@ -750,6 +750,10 @@ and either returns it as a scalar string or as an array with the fields parsed. > > Alternatively, it can take a prepared ident string (e.g. from the commit > > object) and just parse it. > > > > +If the C<explicit> option is set to 1, the returned array will contain an > > +additional boolean specifying whether the ident was configure explicitly by the > > s/configure/configured/
Thanks.
Show 8 quoted lines
> > if (wantarray) {
> > - return $identstr =~ /^(.*) <(.*)> (\d+ [+-]\d{4})$/;
> > + my @ret = $identstr =~ /^(.*) <(.*)> (\d+ [+-]\d{4})$/;
> > + if ($options{explicit} && defined $explicit) {
> > + push @ret, $explicit if defined $explicit;
>
> Isn't the test on this line redundant given that defined $explicit is
> already guaranteed by the condition on the previous line?Yes, thanks (left over from an earlier attempt that tried to avoid having $options{explicit}).
-Peff