summaryrefslogtreecommitdiff
path: root/src/tree-cache.c
Commit message (Collapse)AuthorAgeFilesLines
* Minor tree cache speedupsRussell Belfer2014-04-171-17/+10
| | | | | | | | 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.
* tree-cache: Fix error message typonulltoken2013-11-191-2/+2
|
* tree-cache: Don't segfault upon corruptionnulltoken2013-11-191-3/+6
|
* tree-cache: Zero out the allocated tree children arraynulltoken2013-11-191-0/+2
|
* tree-cache: Free the tree upon the detection of a corrupted childnulltoken2013-11-191-1/+1
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* tree cache: loosen negative entry count checkNguyễn Thái Ngọc Duy2012-12-121-1/+1
| | | | | | | | | | | While C Git has been writing entry count -1 (ie. never other negative numbers) as invalid since day 1, it accepts all negative entry counts as invalid. JGit follows the same rule. libgit2 should also follow, or the index that works with C Git or JGit may someday be rejected by libgit2. Other reimplementations like dulwich and grit have not bothered with parsing or writing tree cache.
* misc: Fix warnings from PVS Studio trialVicent Martí2012-06-071-1/+1
|
* Remove old and unused error codesVicent Martí2012-05-021-47/+30
|
* tree-cache: don't error out on a childless invalidated entryCarlos Martín Nieto2012-04-231-1/+1
| | | | | | | | | The code used to assume that there had to be data after the newline in a tree cache extension entry. This isn't true for a childless invalidated entry if it's the last one, as there won't be any children nor a hash to take up space. Adapt the off-by-one comparison to also work in this case. Fixes #633.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-2/+2
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* Add git_tree_cache_getCarlos Martín Nieto2011-09-271-1/+24
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add git_tree_cache_invalidate_pathCarlos Martín Nieto2011-09-271-1/+47
| | | | | | | 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>
* tree cache: correctly handle invalidated treesCarlos Martín Nieto2011-09-271-17/+10
| | | | | | | | | | | | The fix introduced in a02fc2cd1 (2011-05-24; index: correctly parse invalidated TREE extensions) threw out the rest of the data in the extension if it found an invalidated entry. This was the result of incorrect reading of the documentation. Insted, keep reading the extension, as there may be cached data we can use. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Make tree cache name a flex-arrayCarlos Martín Nieto2011-09-271-14/+12
| | | | 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/+141
Rename git_index_tree to git_tree_cache. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>