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

Re: fetch and bundle don't work in (semi-)broken repo

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 19, 2010, 21:02 UTC
Message-ID
<20101019210233.GA32029@burratino>
In-Reply-To
<alpine.LFD.2.00.1010191635030.2764@xanadu.home>
Hi,

[out of order for convenience] Nicolas Pitre wrote:

> On Tue, 19 Oct 2010, Uwe Kleine-König wrote:
>> and I'm running git-fsck --full now over night as it's bedtime here.
>
> Given that you exploded your repo into loose objects, it'll take _time_.

Yep, I gave bad advice. :( Especially because I forgot that a fsck would be useful at all.

Better advice would be:
 1. Use "git rev-list --objects" to find out what 40aaeb204dc was.
And if that doesn't work:
 2. Run "git fsck", with packs intact.  This will take a while.  The
    result would include a list of missing objects (like 40aaeb204dc),
    and, most importantly, their type.

Following howto/recover-corrupted-blob-object.txt would be useful for identifying a corrupt loose object, but iiuc no corrupt objects are involved here, anyway.

>                                 But ideally you should simply find a 
> pack that contains the problematic object in another repository and copy 
> it with its index 
> file into the broken repository.

I assume the object is gone for good, but if you have it in another repo that would be interesting, too.

To be clear: I think the important data has been recovered from the broken repo already in the form of patches (right?) so the question at hand is whether it would be possible to teach git to do better at recovering automatically. Which might depend on the nature of the missing objects.

Ciao, Jonathan

Previous: Nicolas PitreNext: Nicolas Pitre
Message 5 of 12 in “fetch and bundle don't work in (semi-)broken repo”
  1. Uwe Kleine-KönigOct 19, 2010
  2. Jonathan NiederOct 19, 2010
  3. Uwe Kleine-KönigOct 19, 2010
  4. Nicolas PitreOct 19, 2010
  5. Jonathan NiederOct 19, 2010
  6. Nicolas PitreOct 20, 2010
  7. Uwe Kleine-KönigOct 20, 2010
  8. Nicolas PitreOct 20, 2010
  9. Uwe Kleine-KönigOct 20, 2010
  10. format-patch broken [Was: fetch and bundle don't work in (semi-)broken repo]Uwe Kleine-König, Oct 21, 2010
  11. Uwe Kleine-KönigOct 21, 2010
  12. Nicolas PitreOct 22, 2010

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.