summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:09 (GMT)
commitd637d1b9a8fb765a8542e69bd2e04b3e229f663b (patch)
treeeea008a78eacbc6afbfd793377a70a9642624221 /unpack-trees.c
parent810273bc33b1f50191f90deef74277ee84174efd (diff)
parent7b359ea6b3333a87fd3fa8b84913f2b75ed244ad (diff)
downloadgit-d637d1b9a8fb765a8542e69bd2e04b3e229f663b.zip
git-d637d1b9a8fb765a8542e69bd2e04b3e229f663b.tar.gz
git-d637d1b9a8fb765a8542e69bd2e04b3e229f663b.tar.bz2
Merge branch 'kb/fast-hashmap'
Improvements to our hash table to get it to meet the needs of the msysgit fscache project, with some nice performance improvements. * kb/fast-hashmap: name-hash: retire unused index_name_exists() hashmap.h: use 'unsigned int' for hash-codes everywhere test-hashmap.c: drop unnecessary #includes .gitignore: test-hashmap is a generated file read-cache.c: fix memory leaks caused by removed cache entries builtin/update-index.c: cleanup update_one fix 'git update-index --verbose --again' output remove old hash.[ch] implementation name-hash.c: remove cache entries instead of marking them CE_UNHASHED name-hash.c: use new hash map implementation for cache entries name-hash.c: remove unreferenced directory entries name-hash.c: use new hash map implementation for directories diffcore-rename.c: use new hash map implementation diffcore-rename.c: simplify finding exact renames diffcore-rename.c: move code around to prepare for the next patch buitin/describe.c: use new hash map implementation add a hashtable implementation that supports O(1) removal submodule: don't access the .gitmodules cache entry after removing it
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 164354d..0692ebe 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -105,12 +105,11 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
static void do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
unsigned int set, unsigned int clear)
{
- clear |= CE_HASHED | CE_UNHASHED;
+ clear |= CE_HASHED;
if (set & CE_REMOVE)
set |= CE_WT_REMOVE;
- ce->next = NULL;
ce->ce_flags = (ce->ce_flags & ~clear) | set;
add_index_entry(&o->result, ce,
ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);