diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-08-06 00:35:20 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-08-18 02:34:08 +0200 |
commit | c1af5a3935025f486156cdfe3b006700e73f0a49 (patch) | |
tree | 146efe5813abc0808ae51193a1029b045606a24e /src/pack.h | |
parent | 061047ccb6d9453928fcd3baf94b18fad792f1a0 (diff) | |
download | libgit2-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.h | 3 |
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 */ |