Re: [PATCH v2] send-email: die if CA path doesn't exist
- From
Jeff King <peff@peff.net>
- Date
- Nov 25, 2015, 10:23 UTC
- Message-ID
- <20151125102335.GA2844@sigill.intra.peff.net>
- In-Reply-To
- <20151125101909.GF18913@serenity.lan>
On Wed, Nov 25, 2015 at 10:19:09AM +0000, John Keeping wrote:
Show 15 quoted lines
> > > Changes since v1: > > > - add missing path to error message > > > - remove trailing '.' on error message since die appends "at > > > /path/to/git-send-email line ..." > > > > It won't if the error message ends with a newline. We seem to be wildly > > inconsistent about that in send-email, though. > > Interesting. I think in this case it would definitely be better to add > the newline and avoid printing the location in the script, but it may > make more sense to have a separate pass over git-send-email.perl and fix > all of the die() calls. > > I suspect that everything except the equivalent of BUG() should be > suppressing the location in a user-facing script like this.
Yeah, I think I'd agree. Your patch is merged to next, so we'd want a separate patch to fix. And I agree that a whole pass over the script probably makes sense.
In past projects I have also used a $SIG{__DIE__} handler to massage errors into a nicer format, but it unfortunately gets pretty deep into Perl voodoo.
-Peff