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

Re: [PATCH] fix for "index-pack: rationalize delta resolution code"

From
MRMarco Roeland <marco.roeland@xs4all.nl>
Date
Oct 20, 2008, 19:14 UTC
Message-ID
<20081020191400.GA18743@fiberbit.xs4all.nl>
In-Reply-To
<alpine.LFD.2.00.0810201357340.26244@xanadu.home>
On Monday October 2008 at 14:12 Nicolas Pitre wrote:
Show 15 quoted lines
> My bad.  A small detail went through the crack: the real_type of
> a delta object is the real_type of its base object.
> 
> Without this, the created index will be wrong as the actual object SHA1
> won't match the object.
> 
> Signed-off-by: Nicolas Pitre <nico@cam.org>
> ---
> 
> If you got a corrupted .idx file because of this ('git verify-pack' 
> should tell) then just toss it and recreate with a fixed 'git 
> index-pack'.
> 
> Could anyone having problems fetching from kernel.org with git from the 
> next branch confirm that this also fixes that? Thanks.
I still seem to have the same problem after patching:

$ git pull remote: Counting objects: 279, done. remote: Compressing objects: 100% (78/78), done. remote: Total 177 (delta 136), reused 135 (delta 99) Receiving objects: 100% (177/177), 66.59 KiB, done. fatal: pack has bad object at offset 53487: failed to apply delta fatal: index-pack failed

'git verify-pack' does _not_ report an error for either pack or index. This is with git from branch next at 8f0e41f379d486dd27766d84d994eb1da5b8319d trying to pull from git://git.kernel.org/pub/scm/git/git.git

This is on Debian 'sid' with an AMD64 architecture.

I've put the whole ".git" directory (warning: almost 35MB) for investigation at:

http://www.xs4all.nl/~fiberbit/http://www.xs4all.nl/~fiberbit/git-next-8f0e41f3-bad-index.tgz

I hope I've patched correctly. After applying (cleanly) and rebuilding simply executing "./git" from the workdirectory still uses the old version. Only after using "make install" I get the patched version, which as shown above still gives an error, from the die() at line 528 in index-pack.c: bad_object(delta_obj->idx.offset, "failed to apply delta");

Not much more time tonight here, but perhaps it's easier to reproduce now with the copy of an affected .git directory.

-- 
Marco Roeland
Previous: Harvey HarrisonNext: Marco Roeland
Message 4 of 10 in “fix for "index-pack: rationalize delta resolution code"”
  1. fix for "index-pack: rationalize delta resolution code"Nicolas Pitre, Oct 20, 2008
  2. Harvey HarrisonOct 20, 2008
  3. Harvey HarrisonOct 20, 2008
  4. Marco RoelandOct 20, 2008
  5. Marco RoelandOct 20, 2008
  6. Nicolas PitreOct 20, 2008
  7. Marco RoelandOct 20, 2008
  8. Nicolas PitreOct 20, 2008
  9. Marco RoelandOct 20, 2008
  10. Jeff KingOct 20, 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.