tests/index/cache.c


Log

Author Commit Date CI Message
Edward Thomson 4afe536b 2016-02-28T16:02:49 tests: use legitimate object ids Use legitimate (existing) object IDs in tests so that we have the ability to turn on strict object validation when running tests.
Edward Thomson cdd71711 2014-10-13T14:34:32 Clean up some memory leaks
Carlos Martín Nieto bb0757d5 2014-10-22T21:09:31 tree-cache: correct the entry_count calculation The entry_count field is the amount of index entries covered by a particular cache entry, that is how many files are there (recursively) under a particular directory. The current code that attemps to do this is severely defincient and is trying to count the amount of children, which always comes up to zero. We don't even need to recount, since we have the information during the cache creation. We can take that number and keep it, as we only ever invalidate or replace.
Carlos Martín Nieto 795d8e93 2014-09-29T08:03:22 index: make sure to write cached subtrees if parent is invalidated If e.g. the root tree is invalidated, we still want to write out its children, since those may still have valid cache entries.
Carlos Martín Nieto c2f8b215 2014-09-28T07:00:49 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.
Carlos Martín Nieto ee4db1c1 2014-07-11T11:48:51 index: add tests for the tree cache These test that we invalidate at the right levels and that we remove the tree cache when clearing the index.