diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-05-06 23:37:28 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-05-09 09:40:29 +0200 |
| commit | a332e91c92524cc21818eadfbe723361d31dc187 (patch) | |
| tree | fb2749423740e53ad7948b349ed949b43a4c21a8 /src/pack.h | |
| parent | 2acdf4b854bf55ba2630c7342d09b136d919d6ad (diff) | |
| download | libgit2-a332e91c92524cc21818eadfbe723361d31dc187.tar.gz | |
pack: use a cache for delta bases when unpacking
Bring back the use of the delta base cache for unpacking objects. When
generating the delta chain, we stop when we find a delta base in the
pack's cache and use that as the starting point.
Diffstat (limited to 'src/pack.h')
| -rw-r--r-- | src/pack.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pack.h b/src/pack.h index a2ea3849f..e86889d1b 100644 --- a/src/pack.h +++ b/src/pack.h @@ -62,9 +62,14 @@ typedef struct git_pack_cache_entry { } git_pack_cache_entry; struct pack_chain_elem { + int cached; + git_off_t base_key; + /* if we don't have it cached we have this */ git_off_t offset; size_t size; git_otype type; + /* if cached, we have this instead */ + git_pack_cache_entry *cached_entry; }; typedef git_array_t(struct pack_chain_elem) git_dependency_chain; |
