From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Faheem Mitha <faheem@faheem.info>
Cc: git@vger.kernel.org
Subject: Re: [PUB]corrupt repos does not return error with `git fsck`
Date: Thu, 21 May 2015 10:09:45 +0200 [thread overview]
Message-ID: <vpqd21ujqra.fsf@anie.imag.fr> (raw)
In-Reply-To: <alpine.DEB.2.11.1505202256330.9343@orwell.homelinux.org> (Faheem Mitha's message of "Wed, 20 May 2015 23:28:15 +0530 (IST)")
Faheem Mitha <faheem@faheem.info> writes:
> I was going by the answer (by CodeWizard) in
> http://stackoverflow.com/q/30348615/350713
OK, so the hash you got comes from a superproject which references it.
My guess is that the superproject did a private commit in a submodule,
added this submodule to the superproject, and forgot to push the
submodule.
If so, it's a user error (that could arguably have been avoided with a
better command-line interface, so Git is partly guilty), but not a
repository corruption.
> If I just give a random hash to `git show` in that repos, I get
>
> fatal: ambiguous argument '...': unknown revision or path not in the working tree.
Not "a random hash", but a random abreviated hash. Look:
Changing the last digit:
$ git show 280c12ab49223c64c6f914944287a7d049cf4d23
fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4d23
$ git show 280c12ab49223c64c6f914944287a7d049cf4d24
fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4d24
$ git show 280c12ab49223c64c6f914944287a7d049cf4d25
fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4d25
$ git show 280c12ab49223c64c6f914944287a7d049cf4d26
fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4d26
Removing the last digit:
$ git show 280c12ab49223c64c6f914944287a7d049cf4d2
fatal: ambiguous argument '280c12ab49223c64c6f914944287a7d049cf4d2': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
prev parent reply other threads:[~2015-05-21 8:10 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
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 [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=vpqd21ujqra.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=faheem@faheem.info \
--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