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

Re: Recovering from repository corruption

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 10, 2008, 20:14 UTC
Message-ID
<200806102214.40805.jnareb@gmail.com>
In-Reply-To
<6dbd4d000806101303j4b2032ajc6e004e0a82e4db5@mail.gmail.com>
On Tue, 10 Jun 2008, Denis Bueno wrote:
Show 37 quoted lines
> On Tue, Jun 10, 2008, Jakub Narebski <jnareb@gmail.com> wrote: 
>> Denis Bueno wrote:
>>>
>>> Shouldn't these be unreferenced now that I've run filter-branch?
>>
>> Try to clone this repository (using file:/// pseudo-protocol to force 
>> transfer of objects instead of hardlinking them), and chek if the
>> problem persists in the clone too.  If not, error/missing might be
>> in "garbage".
>>
>> But I'm not sure...
> 
> You're onto something:
> 
> [dorothy.local /tmp <Tue Jun 10> <16:02:08>]
> tmp[176] > git clone file:///Volumes/work/identity.fb/
> Initialized empty Git repository in /tmp/identity.fb/.git/
> remote: Counting objects: 401, done.
> remote: Compressing objects: 100% (364/364), done.
> remote: Total 401 (delta 170), reused 0 (delta 0)
> Receiving objects: 100% (401/401), 233.76 KiB, done.
> Resolving deltas: 100% (170/170), done.
> 
> [dorothy.local /tmp <Tue Jun 10> <16:02:22>]
> tmp[177] > cd identity.fb/
> /tmp/identity.fb
> 
> [dorothy.local /tmp/identity.fb <Tue Jun 10> <16:02:24>]
> identity.fb[178] > git fsck --full
> broken link from  commit 4737fea59fdc8325e09b5206cc7a6ac593446ce3
>               to  commit fe431b4b69453ad9207a5528cf9b9d12ef69c988
> dangling commit 28aa69aafc8ae901e588f6d341b3e6d3558c6d26
> dangling commit 884a8024fbcb9367726abb25f8bb6ac539712d46
> missing commit fe431b4b69453ad9207a5528cf9b9d12ef69c988
> 
> But I've just substituted one error for another.  Are these errors
> easier to fix?

Please remember that in such clone you _don't_ have grafts info (unless you copy it manually), so it is a good test if you correctly rewrote history using git-filter-branch. So take a look at history in your clone using gitk or some similar tool.

In the history you mentioned:
    ...---a---*   b---c---d---*   e---...
           \     /         \     /
            \-X-/           \---/

you should rewritr from 'a'=='X^' to, and including 'e' (and not only from 'd').

But if it is not the case I'm afraid I wouldn't be able to offer any further insight...

-- 
Jakub Narebski
Poland
Previous: Denis BuenoNext: Denis Bueno
Message 6 of 31 in “Recovering from repository corruption”
  1. Denis BuenoJun 10, 2008
  2. Jakub NarebskiJun 10, 2008
  3. Denis BuenoJun 10, 2008
  4. Jakub NarebskiJun 10, 2008
  5. Denis BuenoJun 10, 2008
  6. Jakub NarebskiJun 10, 2008
  7. Denis BuenoJun 10, 2008
  8. Linus TorvaldsJun 10, 2008
  9. Denis BuenoJun 10, 2008
  10. Linus TorvaldsJun 10, 2008
  11. Denis BuenoJun 10, 2008
  12. Linus TorvaldsJun 10, 2008
  13. Denis BuenoJun 10, 2008
  14. TarmiganJun 10, 2008
  15. Denis BuenoJun 10, 2008
  16. Linus TorvaldsJun 10, 2008
  17. Linus TorvaldsJun 10, 2008
  18. Nicolas PitreJun 11, 2008
  19. Linus TorvaldsJun 11, 2008
  20. Nicolas PitreJun 11, 2008
  21. Denis BuenoJun 10, 2008
  22. Junio C HamanoJun 10, 2008
  23. To graft or not to graft... (Re: Recovering from repository corruption)Stephen R. van den Berg, Jun 11, 2008
  24. Jakub NarebskiJun 11, 2008
  25. Linus TorvaldsJun 11, 2008
  26. Johan HerlandJun 12, 2008
  27. Jeff KingJun 12, 2008
  28. Johan HerlandJun 12, 2008
  29. Stephen R. van den BergJun 12, 2008
  30. Nicolas PitreJun 10, 2008
  31. Denis BuenoJun 10, 2008

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.