Re: [PATCHv2 8/8] send-email: do not prompt for explicit repo ident
- From
Jeff King <peff@peff.net>
- Date
- Nov 15, 2012, 08:33 UTC
- Message-ID
- <20121115083315.GA23377@sigill.intra.peff.net>
- In-Reply-To
- <CAMP44s0d+g7bXCnOf55jZNNFS6uJ+4BDowx5uYxWBP4xA+-0zA@mail.gmail.com>
On Thu, Nov 15, 2012 at 03:08:42AM +0100, Felipe Contreras wrote:
Show 23 quoted lines
> I don't think there's any need for all that, this does the trick:
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index aea66a0..503e551 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -748,16 +748,11 @@ if (!$force) {
> }
> }
>
> -my $prompting = 0;
> if (!defined $sender) {
> $sender = $repoauthor || $repocommitter || '';
> - $sender = ask("Who should the emails appear to be from? [$sender] ",
> - default => $sender,
> - valid_re => qr/\@.*\./, confirm_only => 1);
> - print "Emails will be sent from: ", $sender, "\n";
> - $prompting++;
> }
>
> +my $prompting = 0;
>
> This passes all the current tests and the ones you added.It may pass on your system, but it will not on a system that meets the AUTOIDENT prerequisite (it fails the new t9001.19 on my system; I suspect your system config is such that we skip t9001.19 and run t9001.20, whereas mine is the opposite).
> Which kind of user will get the prompt with your patch, that would > miss it with mine?
One whose system is configured in such a way that git can produce an automatic ident (i.e., has a non-blank GECOS name and a FQDN).
-Peff