git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
John Keeping <john@keeping.me.uk>
Date
May 20, 2015, 18:19 UTC
Message-ID
<20150520181944.GA1537@serenity.lan>
In-Reply-To
<CAGZ79kZY68HFDipxLVas9Dg9+NfpOGmywpWfwFL31A0EpLmJFw@mail.gmail.com>
On Wed, May 20, 2015 at 11:02:14AM -0700, Stefan Beller wrote:
Show 8 quoted lines
> $ 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 '12323213123': unknown revision or path not
> in the working tree.

I think 40 hex characters is special cased. Using CGit as a repository with a submodule so I can easily get an unrelated SHA1 and short name:

cgit $ git show $(git -C git rev-parse @) fatal: bad object bb8577532add843833ebf8b5324f94f84cb71ca0 cgit $ git show $(git -C git rev-parse --short @) fatal: ambiguous argument 'bb85775': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'

Previous: Stefan BellerNext: Jeff King
Message 5 of 19 in “corrupt repos does not return error with `git fsck`”
  1. Faheem MithaMay 20, 2015
  2. Matthieu MoyMay 20, 2015
  3. Johannes SchindelinMay 20, 2015
  4. Stefan BellerMay 20, 2015
  5. John KeepingMay 20, 2015
  6. Jeff KingMay 20, 2015
  7. Jeff KingMay 20, 2015
  8. Junio C HamanoMay 20, 2015
  9. Stefan BellerMay 20, 2015
  10. Junio C HamanoMay 20, 2015
  11. Stefan BellerMay 20, 2015
  12. Jeff KingMay 20, 2015
  13. Junio C HamanoMay 20, 2015
  14. Faheem MithaMay 20, 2015
  15. Stefan BellerMay 20, 2015
  16. Faheem MithaMay 20, 2015
  17. Matthieu MoyMay 20, 2015
  18. Faheem MithaMay 20, 2015
  19. Matthieu MoyMay 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.