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
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date
Oct 19, 2010, 20:11 UTC
Message-ID
<20101019201139.GB28166@pengutronix.de>
In-Reply-To
<20101019183925.GF25139@burratino>
Hi Jonathan,
On Tue, Oct 19, 2010 at 01:39:25PM -0500, Jonathan Nieder wrote:
Show 16 quoted lines
> Uwe Kleine-König wrote:
> 
> > 	ukl@hostname:~/path1/linux-2.6$ git fetch ~/path2/linux-2.6 sectionmismatches
> > 	remote: Counting objects: 118, done.
> > 	remote: error: unable to find 40aaeb204dc04d3cf15c060133f65538b43b13b0
> > 	remote: Compressing objects: 100% (83/83), done.
> > 	remote: fatal: unable to read 40aaeb204dc04d3cf15c060133f65538b43b13b0
> > 	error: git upload-pack: git-pack-objects died with error.
> > 	fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
> 
> Sounds like alternates or workdir allowed gc to be overzealous, indeed.
> 
> Could you:
> 
>  1. Make a copy of the corrupted repo, just in case.
>  2. Explode all backs with "git unpack-objects"
I did:
	mv .git/objects/pack .git/objects/pack.bak
	rm .git/objects/info/alternates
	for p in .git/objects/pack.bak/*.pack ~/path1/linux-2.6/.git/objects/pack/*.pack; do
		git unpack-objects < $p
	done
>  3. Identify the missing object, as explained in
>     Documentation/howto/recover-corrupted-blob-object.txt?
and I'm running git-fsck --full now over night as it's bedtime here.
 
Show 14 quoted lines
> With that information, it would be easier to examine whether and how
> pack-objects could be smarter about fetching the non-missing objects.
> 
> > I don't know what 40aaeb204dc04d3cf15c060133f65538b43b13b0 is, but I
> > think it's not necessary for the sectionmismatches branch:
> > 
> > 	ukl@hostname:~/path2/linux-2.6$ git format-patch linus/master..sectionmismatches
> > 	0001-wip-enable-DEBUG_SECTION_MISMATCH.patch
> [...]
> > and linus/master is contained in ~/path1/linux-2.6, too.
> 
> Cc-ing Nico, pack-objects wizard.
> 
> Thanks for reporting.
Thanks for helping

Best regards Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Previous: Jonathan NiederNext: Nicolas Pitre
Message 3 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.