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

git fsck: failed to apply delta

From
ANAndre Noll <maan@systemlinux.org>
Date
Nov 7, 2011, 14:25 UTC
Message-ID
<20111107142537.GD13394@systemlinux.org>
Hi

I'm getting this when running git fsck or git repack against a large (21G) repo which was created from subversion using git svn clone:

	fatal: failed to apply delta

The debugging patch below indicates that this repo fails the sanity check for the size in patch_delta(). With this patch applied I'm getting the following additional output

	error: bad delta header size, expected: 236, have 1994568

This is 100% reproducible. I'm using the git master branch as of today (5ae0f681) but the same problem showed up also with an older git version.

Does anybody know what's going on here?

Thanks Andre ---

diff --git a/patch-delta.c b/patch-delta.c
index 56e0a5e..cff4d79 100644
--- a/patch-delta.c
+++ b/patch-delta.c
@@ -28,8 +28,10 @@ void *patch_delta(const void *src_buf, unsigned long src_size,
 
 	/* make sure the orig file size matches what we expect */
 	size = get_delta_hdr_size(&data, top);
-	if (size != src_size)
+	if (size != src_size) {
+		error("bad delta header size, expected: %lu, have %lu", src_size, size);
 		return NULL;
+	}
 
 	/* now the result size */
 	size = get_delta_hdr_size(&data, top);
-- 
The only person who always got his work done by Friday was Robinson Crusoe
Message 1 of 1 in “git fsck: failed to apply delta”
  1. Andre NollNov 7, 2011

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.