Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: John Dlugosz <JDlugosz@TradeStation.com>
Cc: git@vger.kernel.org
Subject: Re: Cryptic error messages?
Date: Wed, 22 Apr 2009 16:32:51 -0400	[thread overview]
Message-ID: <20090422203251.GD14146@coredump.intra.peff.net> (raw)
In-Reply-To: <450196A1AAAE4B42A00A8B27A59278E70ACE0030@EXCHANGE.trad.tradestation.com>

On Mon, Apr 20, 2009 at 04:18:09PM -0400, John Dlugosz wrote:

> $ git push
> Counting objects: 9, done.
> Compressing objects: 100% (8/8), done.
> Writing objects: 100% (8/8), 3.62 KiB, done.
> Total 8 (delta 4), reused 0 (delta 0)
> Unpacking objects: 100% (8/8), done.
> fatal: unresolved deltas left after unpacking
> error: unpack failed: unpacker exited with error code
> To //tx01fs01/sys/dev/git/repositories/aardvark.git
>  ! [remote rejected] dev -> dev (n/a (unpacker error))
> error: failed to push some refs to
> '//tx01fs01/sys/dev/git/repositories/aardvark
> .git'
> 
> Huh?  I'm having trouble defending git's reputation.

Yeah, that is horribly cryptic. What is happening is:

  1. send-pack on the local system spawns receive-pack on the
     remote, which in turn spawns unpack-objects as a helper

  2. unpack-objects barfs with

       fatal: unresolved deltas left after unpacking

     to stderr which is the actual useful bit.

  3. receive-pack notices that the unpacker failed, and spews

       error: unpack failed: unpacker exited with error code

     to stderr, in case unpack-objects didn't say anything.

  4. receive-pack also marks the "status" passed back to send-pack
     as "n/a (unpacker error)"

  5. send-pack gives you the usual nice status table with the ugly
     status from receive-pack marked in it, and then says "OK, I failed
     to push".

So making it better is not quite as simple as you might hope, since
there are three processes involved, and none knows that the other has
spewed to stderr already. But I think there is some low-hanging fruit:

  1. There is no point in receive-pack saying anything to stderr about
     the unpacker failing; in most cases, the unpacker already said
     something, and even if it didn't, we are reporting the problem to
     send-pack in the status field.

  2. "n/a (unpacker error)" is unnecessarily cryptic. Yes, the specifics
     of the message are "not available" (which is presumably what the
     n/a stands for), but the user doesn't care. I think something like
     "failed to unpack objects" would be better.

That leaves only the fact that the _specific_ reason the unpacker failed
is not part of the usual status table. Fixing that is actually a little
tricky because of the multiple processes involved (which do not already
have a string-based communications channel between them).

And of course, it's still a bit cryptic to get "unresolved deltas after
unpacking". However, that is one of those messages that _should_ never
come up, unless the sender is pushing a bogus pack. I wouldn't be
surprised if it an msysgit bug.

-Peff

  parent reply	other threads:[~2009-04-22 20:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 20:18 Cryptic error messages? John Dlugosz
2009-04-21 12:08 ` Dmitry Potapov
2009-04-21 16:54   ` John Dlugosz
2009-04-22 20:32 ` Jeff King [this message]
2009-04-22 20:50   ` Jeff King
2009-04-22 21:14     ` Junio C Hamano
2009-04-22 21:23       ` Jeff King
2009-04-22 22:07   ` John Dlugosz

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=20090422203251.GD14146@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=JDlugosz@TradeStation.com \
    --cc=git@vger.kernel.org \
    /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