]> git.ipfire.org Git - thirdparty/git.git/blobdiff - dir.c
Create pathname-based hash-table lookup into index
[thirdparty/git.git] / dir.c
diff --git a/dir.c b/dir.c
index 1b9cc7a8a81002fa2971d71c41a256444e6112fe..6543105b9622212430a9e5ed131a81074e019d9a 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -346,7 +346,7 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
 
 struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
 {
-       if (cache_name_pos(pathname, len) >= 0)
+       if (cache_name_exists(pathname, len))
                return NULL;
 
        ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);