summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorDavid Michael Barr <b@rr-dav.id.au>2012-11-30 13:33:30 +1100
committerDavid Michael Barr <b@rr-dav.id.au>2012-12-03 10:39:17 +1100
commit44f9f547972efecd326fbf6e92ae1297cc9e1813 (patch)
treee38c22b3d902f7aa9614db82dd4962f713cdc837 /include/git2/diff.h
parentd1b6ea8ad14f41b87026ab407005e887c4ff6b68 (diff)
downloadlibgit2-44f9f547972efecd326fbf6e92ae1297cc9e1813.tar.gz
pack: add git_packfile_resolve_header
To paraphrase @peff: You can get both size and type from a packed object reasonably cheaply. If you have: * An object that is not a delta; both type and size are available in the packfile header. * An object that is a delta. The packfile type will be OBJ_*_DELTA, and you have to resolve back to the base to find the real type. That means potentially a lot of packfile index lookups, but each one is relatively cheap. For the size, you inflate the first few bytes of the delta, whose header will tell you the resulting size of applying the delta to the base. For simplicity, we just decompress the whole delta for now.
Diffstat (limited to 'include/git2/diff.h')
0 files changed, 0 insertions, 0 deletions