Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-08-06 02:35:20 +0400
committerVicent Marti <tanoku@gmail.com>2011-08-18 04:34:08 +0400
commitc1af5a3935025f486156cdfe3b006700e73f0a49 (patch)
tree146efe5813abc0808ae51193a1029b045606a24e /src/pack.h
parent061047ccb6d9453928fcd3baf94b18fad792f1a0 (diff)
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 */