Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Stefan Beller <sbeller@google.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Faheem Mitha <faheem@faheem.info>,
	"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PUB]corrupt repos does not return error with `git fsck`
Date: Wed, 20 May 2015 13:39:36 -0700	[thread overview]
Message-ID: <xmqqlhgjm19z.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150520183115.GB7142@peff.net> (Jeff King's message of "Wed, 20 May 2015 14:31:15 -0400")

Jeff King <peff@peff.net> writes:

> I should have looked before replying. It would indeed break "cat-file
> -e" horribly. So the right answer may be to just improve the "bad
> object" message (probably by checking has_sha1_file there and diagnosing
> it either as missing or corrupted).

I should have looked before replying, too ;-)

Yeah, "bad object" sounds as if we tried to parse something that
exists and it was corrupt.  So classifying "a file or a pack index
entry exists where a valid object with that name should reside in"
as "bad object" and "there is no such file or a pack index entry
that would house the named object" as "missing object" _might_ make
things better.

But let's think about it a bit more.  Would it have prevented the
original confusion if we said "missing object"?  I have a feeling
that it wouldn't have.  Faheem was so convinced that the object
named with the 40-hex *must* exist in the cloned repository, and if
we told "missing object" to such a person, it will just enforce the
(mis)conception that the repository is somehow corrupt, when it is
not.

So...

  reply	other threads:[~2015-05-20 20:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 16:17 corrupt repos does not return error with `git fsck` Faheem Mitha
2015-05-20 17:19 ` [PUB]corrupt " Matthieu Moy
2015-05-20 17:40   ` Johannes Schindelin
2015-05-20 18:02     ` Stefan Beller
2015-05-20 18:19       ` John Keeping
2015-05-20 18:22       ` Jeff King
2015-05-20 18:31         ` Jeff King
2015-05-20 20:39           ` Junio C Hamano [this message]
2015-05-20 20:57             ` Stefan Beller
2015-05-20 21:06               ` Junio C Hamano
2015-05-20 21:13                 ` Stefan Beller
2015-05-20 21:55             ` Jeff King
2015-05-20 20:16         ` Junio C Hamano
2015-05-20 18:24       ` Faheem Mitha
2015-05-20 18:54         ` Stefan Beller
2015-05-20 19:13           ` Faheem Mitha
2015-05-20 21:03       ` Matthieu Moy
2015-05-20 17:58   ` Faheem Mitha
2015-05-21  8:09     ` Matthieu Moy

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=xmqqlhgjm19z.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=faheem@faheem.info \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    --cc=sbeller@google.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