packfile: allow install_packed_git to handle arbitrary repositories
[gitweb.git] / cache-tree.c
index 18946aa458da3596e7aed3d5ce0af32e0458fccb..3841cef0c064b19722cb60742ed3bd95b9cde520 100644 (file)
@@ -607,7 +607,7 @@ int write_index_as_tree(unsigned char *sha1, struct index_state *index_state, co
 
        hold_lock_file_for_update(&lock_file, index_path, LOCK_DIE_ON_ERROR);
 
-       entries = read_index_from(index_state, index_path);
+       entries = read_index_from(index_state, index_path, get_git_dir());
        if (entries < 0) {
                ret = WRITE_TREE_UNREADABLE_INDEX;
                goto out;