git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Yuri <yuri@rawbw.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: git quietly fails on https:// URL, https errors are never reported to user
Date: Fri, 17 Jan 2014 16:10:35 -0500	[thread overview]
Message-ID: <20140117211035.GA8447@sigill.intra.peff.net> (raw)
In-Reply-To: <52D9950B.3030300@rawbw.com>

On Fri, Jan 17, 2014 at 12:39:39PM -0800, Yuri wrote:

> >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.

Yes, we can, but that is in the same boat as a protocol change: you have
to teach every remote helper (some of which are written by third
parties) to communicate over this sideband channel.

It's should be slightly easier than a change to the protocol text,
because it's mostly backwards compatible (helpers should already be
returning a non-zero error code). I think there is some complication
with exit codes and remote-helpers, where you cannot expect just check
the exit code at any time. I _think_ from previous discussions that it
is safe to waitpid() on the helper after we have gotten EOF on the
reading pipe, though.

-Peff

      reply	other threads:[~2014-01-17 21:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 12:27 git quietly fails on https:// URL, https errors are never reported to user Yuri
2014-01-16 18:03 ` Jeff King
2014-01-16 19:28   ` Yuri
2014-01-17  9:40   ` Yuri
2014-01-17 19:43     ` Junio C Hamano
2014-01-17 20:13       ` Jeff King
2014-01-17 20:18         ` Jeff King
2014-01-17 20:39         ` Yuri
2014-01-17 21:10           ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140117211035.GA8447@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=yuri@rawbw.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).