summaryrefslogtreecommitdiff
path: root/src/pack.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-08-06 00:35:20 +0200
committerVicent Marti <tanoku@gmail.com>2011-08-18 02:34:08 +0200
commitc1af5a3935025f486156cdfe3b006700e73f0a49 (patch)
tree146efe5813abc0808ae51193a1029b045606a24e /src/pack.h
parent061047ccb6d9453928fcd3baf94b18fad792f1a0 (diff)
downloadlibgit2-c1af5a3935025f486156cdfe3b006700e73f0a49.tar.gz
Implement cooperative caching
When indexing a file with ref deltas, a temporary cache for the offsets has to be built, as we don't have an index file yet. If the user takes the responsiblity for filling the cache, the packing code will look there first when it finds a ref delta. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/pack.h')
-rw-r--r--src/pack.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pack.h b/src/pack.h
index a7112a6aa..164086fdf 100644
--- a/src/pack.h
+++ b/src/pack.h
@@ -77,8 +77,9 @@ struct git_pack_file {
int index_version;
git_time_t mtime;
- unsigned pack_local:1, pack_keep:1;
+ unsigned pack_local:1, pack_keep:1, has_cache:1;
git_oid sha1;
+ git_vector cache;
/* something like ".git/objects/pack/xxxxx.pack" */
char pack_name[GIT_FLEX_ARRAY]; /* more */