diff options
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c index 50610c3f3c..b482167a69 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -1,7 +1,6 @@ #define USE_THE_REPOSITORY_VARIABLE #include "git-compat-util.h" -#include "environment.h" #include "hex.h" #include "lockfile.h" #include "tree.h" @@ -12,6 +11,7 @@ #include "object-store-ll.h" #include "read-cache-ll.h" #include "replace-object.h" +#include "repository.h" #include "promisor-remote.h" #include "trace.h" #include "trace2.h" @@ -725,7 +725,8 @@ int write_index_as_tree(struct object_id *oid, struct index_state *index_state, hold_lock_file_for_update(&lock_file, index_path, LOCK_DIE_ON_ERROR); - entries = read_index_from(index_state, index_path, get_git_dir()); + entries = read_index_from(index_state, index_path, + repo_get_git_dir(the_repository)); if (entries < 0) { ret = WRITE_TREE_UNREADABLE_INDEX; goto out; |