summaryrefslogtreecommitdiff
path: root/src/tree-cache.h
Commit message (Collapse)AuthorAgeFilesLines
* index: write out the tree cache extensionCarlos Martín Nieto2014-10-101-1/+3
| | | | | | | | | | 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.
* tree-cache: remove the parent pointerCarlos Martín Nieto2014-10-101-3/+2
| | | | | This wasn't used. We invalidate based on the full path, so we always go down the tree, never up.
* index: fill the tree cache when reading from a treeCarlos Martín Nieto2014-10-101-0/+4
| | | | | | When reading from a tree, we know what every tree is going to look like, so we can fill in the tree cache completely, making use of the index for modification of trees a lot quicker.
* tree-cache: move to use a pool allocatorCarlos Martín Nieto2014-10-101-2/+3
| | | | | | This simplifies freeing the entries quite a bit; though there aren't that many failure paths right now, introducing filling the cache from a tree will introduce more. This makes sure not to leak memory on errors.
* tree-cache: extract the allocationCarlos Martín Nieto2014-10-101-0/+1
|
* Join typedef and struct definitions in single file.Ciro Santilli2014-09-241-4/+2
|
* Minor tree cache speedupsRussell Belfer2014-04-171-0/+1
| | | | | | | | While I was looking at the conflict cleanup code, I looked over at the tree cache code, since we clear the tree cache for each entry that gets removed and there is some redundancy there. I made some small tweaks to avoid extra calls to strchr and strlen in a few circumstances.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Add git_tree_cache_getCarlos Martín Nieto2011-09-271-0/+1
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add git_tree_cache_invalidate_pathCarlos Martín Nieto2011-09-271-0/+1
| | | | | | | Whenever a file is updated in the index, each tree leading towards it needs to be invalidated. Provide the supporting function. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Make tree cache name a flex-arrayCarlos Martín Nieto2011-09-271-2/+1
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Move the tree cache functions to their own fileCarlos Martín Nieto2011-09-271-0/+30
Rename git_index_tree to git_tree_cache. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>