aboutsummaryrefslogtreecommitdiffstats
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/setup.c b/setup.c
index 1ebcab625f..1bfec288ab 100644
--- a/setup.c
+++ b/setup.c
@@ -51,7 +51,7 @@ static int abspath_part_inside_repo(char *path)
size_t wtlen;
char *path0;
int off;
- const char *work_tree = precompose_string_if_needed(get_git_work_tree());
+ const char *work_tree = precompose_string_if_needed(repo_get_work_tree(the_repository));
struct strbuf realpath = STRBUF_INIT;
if (!work_tree)
@@ -147,7 +147,7 @@ char *prefix_path(const char *prefix, int len, const char *path)
{
char *r = prefix_path_gently(prefix, len, NULL, path);
if (!r) {
- const char *hint_path = get_git_work_tree();
+ const char *hint_path = repo_get_work_tree(the_repository);
if (!hint_path)
hint_path = repo_get_git_dir(the_repository);
die(_("'%s' is outside repository at '%s'"), path,
@@ -475,7 +475,7 @@ int is_inside_git_dir(void)
int is_inside_work_tree(void)
{
if (inside_work_tree < 0)
- inside_work_tree = is_inside_dir(get_git_work_tree());
+ inside_work_tree = is_inside_dir(repo_get_work_tree(the_repository));
return inside_work_tree;
}
@@ -490,7 +490,7 @@ void setup_work_tree(void)
if (work_tree_config_is_bogus)
die(_("unable to set up work tree using invalid config"));
- work_tree = get_git_work_tree();
+ work_tree = repo_get_work_tree(the_repository);
if (!work_tree || chdir_notify(work_tree))
die(_("this operation must be run in a work tree"));
@@ -547,7 +547,7 @@ static void setup_original_cwd(void)
* Get our worktree; we only protect the current working directory
* if it's in the worktree.
*/
- worktree = get_git_work_tree();
+ worktree = repo_get_work_tree(the_repository);
if (!worktree)
goto no_prevention_needed;
@@ -1062,9 +1062,9 @@ static const char *setup_explicit_git_dir(const char *gitdirenv,
set_git_work_tree(".");
/* set_git_work_tree() must have been called by now */
- worktree = get_git_work_tree();
+ worktree = repo_get_work_tree(the_repository);
- /* both get_git_work_tree() and cwd are already normalized */
+ /* both repo_get_work_tree() and cwd are already normalized */
if (!strcmp(cwd->buf, worktree)) { /* cwd == worktree */
set_git_dir(gitdirenv, 0);
free(gitfile);
@@ -2192,7 +2192,7 @@ static int create_default_files(const char *template_path,
char *path;
int reinit;
int filemode;
- const char *work_tree = get_git_work_tree();
+ const char *work_tree = repo_get_work_tree(the_repository);
/*
* First copy the templates -- we might have the default