From: "Carlos Martín Nieto" <cmn@elego.de>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] branch: don't assume the merge filter ref exists
Date: Tue, 28 Feb 2012 16:14:50 +0100 [thread overview]
Message-ID: <1330442090.691.9.camel@centaur.lab.cmartin.tk> (raw)
In-Reply-To: <20120227194305.GE1600@sigill.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
On Mon, 2012-02-27 at 14:43 -0500, Jeff King wrote:
> On Mon, Feb 27, 2012 at 11:33:49AM -0800, Junio C Hamano wrote:
>
> > Jeff King <peff@peff.net> writes:
> >
> > > You would also get NULL if the object exists but is not a commit. Maybe:
> > >
> > > die("object '%s' does not point to a commit", ...)
> > >
> > > would be better? It covers the wrong-type case, and is still technically
> > > true when the object does not exist.
> >
> > For this particular message I like the above a lot better. The output
> > from "git grep -e 'invalid object' -e 'bad object'" seems to show that
> > the use of both are fairly evenly distributed.
>
> It looks like "bad object" generally comes from parse_object failing,
> which makes sense. It either means object corruption or you fed a full
> 40-char sha1 that didn't exist (which, if you are being that specific,
> probably is an indication of broken-ness in your repository).
Right. Another version of the fix I was playing with used parse_object
after get_sha1 in opt_parse_merge_filter to make sure there that the
objects did exist, so I copied that error message for this patch.
I see Junio's already squashed this in, and it's certainly a better
message.
cmn
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2012-02-28 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 12:26 [BUG] git branch --merged $unknown_checksum segfaults Bernhard Reutner-Fischer
2012-02-27 15:11 ` [PATCH] branch: don't assume the merge filter ref exists Carlos Martín Nieto
2012-02-27 18:05 ` Junio C Hamano
2012-02-27 19:30 ` Jeff King
2012-02-27 19:33 ` Junio C Hamano
2012-02-27 19:43 ` Jeff King
2012-02-28 15:14 ` Carlos Martín Nieto [this message]
2012-02-28 17:32 ` Junio C Hamano
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=1330442090.691.9.camel@centaur.lab.cmartin.tk \
--to=cmn@elego.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=rep.dot.nop@gmail.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).