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

Re: fact-import: failed to apply delta

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 10, 2009, 17:22 UTC
Message-ID
<20090210172212.GR30949@spearce.org>
In-Reply-To
<alpine.LNX.1.00.0902101118110.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> wrote:
> 
> Is there some way to see if the pack it was writing is actually corrupt 
> (beyond not having the hash set)?

Hmm. If you have the pack fragment, its going to take some editing to get it through the existing validation tools.

First you need to know how many objects are in the pack just so you can update the object count, which is a 4 byte network byte order field starting at offset 8. Then you need the SHA-1 checksum of the entire pack appended onto the end, as the last 20 bytes.

Once the pack is "closed" (by applying those fixes), you can run it through both index-pack and verify-pack. They pick up most errors, especially a delta apply sort of error. They won't find corrupt tree modes though, or object connectivity errors.

-- 
Shawn.
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 5 of 24 in “fact-import: failed to apply delta”
  1. Daniel BarkalowFeb 10, 2009
  2. Johannes SchindelinFeb 10, 2009
  3. Shawn O. PearceFeb 10, 2009
  4. Daniel BarkalowFeb 10, 2009
  5. Shawn O. PearceFeb 10, 2009
  6. Daniel BarkalowFeb 10, 2009
  7. Shawn O. PearceFeb 10, 2009
  8. Daniel BarkalowFeb 10, 2009
  9. Shawn O. PearceFeb 10, 2009
  10. Daniel BarkalowFeb 10, 2009
  11. Shawn O. PearceFeb 10, 2009
  12. Daniel BarkalowFeb 10, 2009
  13. Shawn O. PearceFeb 10, 2009
  14. Daniel BarkalowFeb 10, 2009
  15. Junio C HamanoFeb 10, 2009
  16. Junio C HamanoFeb 10, 2009
  17. Shawn O. PearceFeb 10, 2009
  18. Junio C HamanoFeb 10, 2009
  19. Shawn O. PearceFeb 10, 2009
  20. Junio C HamanoFeb 10, 2009
  21. Daniel BarkalowFeb 11, 2009
  22. Shawn O. PearceFeb 11, 2009
  23. Junio C HamanoFeb 11, 2009
  24. Daniel BarkalowFeb 11, 2009

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.