Re: [PATCH 5/6] Git.pm: teach "ident" to query explicitness
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 14, 2012, 17:12 UTC
- Message-ID
- <20121114171213.GD6858@elie.Belkin>
- In-Reply-To
- <20121113165320.GE12626@sigill.intra.peff.net>
Jeff King wrote:
> "git var" recently learned to report on whether an ident we > fetch from it was configured explicitly or implicitly. Let's > make that information available to callers of the ident > function.
Sounds sensible. Quick nits:
[...]
Show 18 quoted lines
> --- a/perl/Git.pm
> +++ b/perl/Git.pm
> @@ -737,7 +737,7 @@ sub remote_refs {
> }
>
>
> -=item ident ( TYPE | IDENTSTR )
> +=item ident ( TYPE | IDENTSTR [, options] )
>
> =item ident_person ( TYPE | IDENTSTR | IDENTARRAY )
>
> @@ -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
> +user.s/configure/configured/
I'd suggest adding "See GIT_COMMITTER_EXPLICIT in git-var(1) for details" to make the semantics crystal clear. What do you think?
Thanks, Jonathan