Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-21 Thread Matthieu Moy
Faheem Mitha fah...@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

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Matthieu Moy
Faheem Mitha fah...@faheem.info writes: Hi, Clone the repos https://github.com/fmitha/SICL. Then git show 280c12ab49223c64c6f914944287a7d049cf4dd0 gives fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 It seems 280c12ab49223c64c6f914944287a7d049cf4dd0 is not an

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Stefan Beller
$ git clone https://github.com/fmitha/SICL cd SICL $ git show 280c12ab49223c64c6f914944287a7d049cf4dd0 fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 $ git show 12323213123 # just to be sure to have a different error message for non existing objects. fatal: ambiguous argument

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Jeff King
On Wed, May 20, 2015 at 11:02:14AM -0700, Stefan Beller wrote: $ git clone https://github.com/fmitha/SICL cd SICL $ git show 280c12ab49223c64c6f914944287a7d049cf4dd0 fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 $ git show 12323213123 # just to be sure to have a different error

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Junio C Hamano
Jeff King p...@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

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Matthieu Moy
sbel...@google.com writes: $ git clone https://github.com/fmitha/SICL cd SICL $ git show 280c12ab49223c64c6f914944287a7d049cf4dd0 fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 $ git show 12323213123 # just to be sure to have a different error message for non existing objects.

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Stefan Beller
On Wed, May 20, 2015 at 1:39 PM, Junio C Hamano gits...@pobox.com wrote: So... maybe we need a command: Given this SHA1, tell me anything you know about it, Is it a {blob,tree,commit,tag}? Is it referenced from anywhere else in this repository and if so, which type? And if it is not

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: We could add a has_sha1_file() check in get_sha1 for this case. Please don't. get_sha1() is merely I have this string, which may be a 40-hex or an extended SHA-1 expression. Turn it into a 20-byte binary and does not require you to have any such object. -- To

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: On Wed, May 20, 2015 at 1:39 PM, Junio C Hamano gits...@pobox.com wrote: So... maybe we need a command: Given this SHA1, tell me anything you know about it, Is it a {blob,tree,commit,tag}? Is it referenced from anywhere else in this repository and

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Stefan Beller
On Wed, May 20, 2015 at 2:06 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: On Wed, May 20, 2015 at 1:39 PM, Junio C Hamano gits...@pobox.com wrote: So... maybe we need a command: Given this SHA1, tell me anything you know about it, Is it a

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Jeff King
On Wed, May 20, 2015 at 01:39:36PM -0700, Junio C Hamano wrote: 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

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Faheem Mitha
On Wed, 20 May 2015, Stefan Beller wrote: On Wed, May 20, 2015 at 11:24 AM, Faheem Mitha fah...@faheem.info wrote: So, is the repos corrupt or not? Also, I don't understand why you say There is no file 28/0c... however. Why would you expect there to be? I don't see it mentioned in

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Faheem Mitha
On Wed, 20 May 2015, Matthieu Moy wrote: Faheem Mitha fah...@faheem.info writes: Hi, Clone the repos https://github.com/fmitha/SICL. Then git show 280c12ab49223c64c6f914944287a7d049cf4dd0 gives fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 It seems

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Faheem Mitha
Hi Stefan, Thank you for the reply, but I don't follow what conclusion you are drawing, if any. On Wed, 20 May 2015, Stefan Beller wrote: $ git clone https://github.com/fmitha/SICL cd SICL $ git show 280c12ab49223c64c6f914944287a7d049cf4dd0 fatal: bad object

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Jeff King
On Wed, May 20, 2015 at 02:22:19PM -0400, Jeff King wrote: On Wed, May 20, 2015 at 11:02:14AM -0700, Stefan Beller wrote: $ git clone https://github.com/fmitha/SICL cd SICL $ git show 280c12ab49223c64c6f914944287a7d049cf4dd0 fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Johannes Schindelin
Hi, On 2015-05-20 19:19, Matthieu Moy wrote: Faheem Mitha fah...@faheem.info writes: Clone the repos https://github.com/fmitha/SICL. Then git show 280c12ab49223c64c6f914944287a7d049cf4dd0 gives fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 It seems

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread Stefan Beller
On Wed, May 20, 2015 at 11:24 AM, Faheem Mitha fah...@faheem.info wrote: So, is the repos corrupt or not? Also, I don't understand why you say There is no file 28/0c... however. Why would you expect there to be? I don't see it mentioned in that list. Each object is stored at

Re: [PUB]corrupt repos does not return error with `git fsck`

2015-05-20 Thread John Keeping
On Wed, May 20, 2015 at 11:02:14AM -0700, Stefan Beller wrote: $ git clone https://github.com/fmitha/SICL cd SICL $ git show 280c12ab49223c64c6f914944287a7d049cf4dd0 fatal: bad object 280c12ab49223c64c6f914944287a7d049cf4dd0 $ git show 12323213123 # just to be sure to have a different error