Re: git quietly fails on https:// URL, https errors are never reported to user
- From
- Yuri <yuri@rawbw.com>
- Date
- Jan 17, 2014, 20:39 UTC
- Message-ID
- <52D9950B.3030300@rawbw.com>
- In-Reply-To
- <20140117201325.GB775@sigill.intra.peff.net>
On 01/17/2014 12:13, Jeff King wrote:
Show 15 quoted lines
> $ git clonehttps://google.com/foo.git > Cloning into 'foo'... > fatal: repository 'https://google.com/foo.git/' not found > fatal: Reading from helper 'git-remote-https' failed > > That second line is not adding anything, and IMHO is making things > uglier and more confusing. We_expected_ the helper to hang up; that's > how it signals an error to us. It is not an unexpected condition at all. > The exit(128) we do is simply propagating the error report of the > helper. > > That's the common error case: the message is redundant and annoying. The > _uncommon_ case is the one Yuri hit: some library misconfiguration that > causes the helper not to run at all. Adding back any message is hurting > the common case to help the uncommon one.
But you can use the error code value to convey the cause of the failure to git, and avoid an unnecessary message in git itself. Based on the error code value git could tell if the error has already been reported to user.
Yuri