aboutsummaryrefslogtreecommitdiffstats
path: root/pathspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pathspec.c b/pathspec.c
index 2133b9fe60..0fc6f84a6e 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "git-compat-util.h"
#include "abspath.h"
#include "parse.h"
@@ -493,9 +495,9 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
if (!have_git_dir())
die(_("'%s' is outside the directory tree"),
copyfrom);
- hint_path = get_git_work_tree();
+ hint_path = repo_get_work_tree(the_repository);
if (!hint_path)
- hint_path = get_git_dir();
+ hint_path = repo_get_git_dir(the_repository);
die(_("%s: '%s' is outside repository at '%s'"), elt,
copyfrom, absolute_path(hint_path));
}