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

Patches for libgit2

From
HCHervé Cauwelier <herve@itaapy.com>
Date
Oct 3, 2009, 18:09 UTC
Message-ID
<1254593401-18801-1-git-send-email-herve@itaapy.com>
Hi,

Please find patches for libgit2. They allowed me to read the history of a repository with only 75 patches but hacked by an history shortening.

Commits were both in a 5 GB pack file and loose objects. So I had to add support for pack files. Hopefully, reading idx files was already there so I followed the same model.

Patches can also be cloned at "git://git.hforge.org/libgit2.git".

There is a Python wrapper on the next side, forking from the existing libgit2-python [1]. They bring the same functionnalities but the patches are not slick yet.

[1] http://code.istique.net/gitweb/?p=libgit2-python.git;a=summary

One thing that would miss is unit tests, but I lack experience on testing C code, and it would require having a small but exhaustive pack file with different types of object, including ofs and ref deltas. Help on this part is welcome.

Next step would be decoding raw objects to commits, trees, blobs and tags. There is already the start of a commit structure. I'll be starting from that.

Regards,
Hervé
Next: Hervé Cauwelier
Message 1 of 8 in “Patches for libgit2”
  1. Hervé CauwelierOct 3, 2009
  2. 1/6 Open the pack file and keep a map on it.Hervé Cauwelier, Oct 3, 2009
  3. 2/6 Read the base offset or name of delta objectsHervé Cauwelier, Oct 3, 2009
  4. 3/6 Allow zlib to read a pack buffer longer than the actual dataHervé Cauwelier, Oct 3, 2009
  5. 4/6 Inflate an object from a pack fileHervé Cauwelier, Oct 3, 2009
  6. 5/6 This assertion is valid for both loose and packed objectsHervé Cauwelier, Oct 3, 2009
  7. 6/6 Read an object from a pack fileHervé Cauwelier, Oct 3, 2009
  8. Shawn O. PearceOct 5, 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.