diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-28 07:00:49 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-10-10 19:43:42 +0200 |
| commit | c2f8b215937ed6f17dce94a4bde26d5c83b42533 (patch) | |
| tree | a8ec9796153969a8b857430fc1c04061026a731a /src/tree.c | |
| parent | 46bb00673013a7dae1ee81c484ac05c533ed1c4d (diff) | |
| download | libgit2-c2f8b215937ed6f17dce94a4bde26d5c83b42533.tar.gz | |
index: write out the tree cache extension
Keeping the cache around after read-tree is only one part of the
optimisation opportunities. In order to share the cache between program
instances, we need to write the TREE extension to the index.
Do so, taking the opportunity to rename 'entries' to 'entry_count' to
match the name given in the format description. The included test is
rather trivial, but works as a sanity check.
Diffstat (limited to 'src/tree.c')
| -rw-r--r-- | src/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tree.c b/src/tree.c index 28190d6da..adc6fe5e4 100644 --- a/src/tree.c +++ b/src/tree.c @@ -488,7 +488,7 @@ static int write_tree( const git_tree_cache *cache; cache = git_tree_cache_get(index->tree, dirname); - if (cache != NULL && cache->entries >= 0){ + if (cache != NULL && cache->entry_count >= 0){ git_oid_cpy(oid, &cache->oid); return (int)find_next_dir(dirname, index, start); } @@ -589,7 +589,7 @@ int git_tree__write_index( return GIT_EUNMERGED; } - if (index->tree != NULL && index->tree->entries >= 0) { + if (index->tree != NULL && index->tree->entry_count >= 0) { git_oid_cpy(oid, &index->tree->oid); return 0; } |
