diff options
Diffstat (limited to 'builtin/fsmonitor--daemon.c')
| -rw-r--r-- | builtin/fsmonitor--daemon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c index 1593713f4c..25451d999e 100644 --- a/builtin/fsmonitor--daemon.c +++ b/builtin/fsmonitor--daemon.c @@ -2,7 +2,6 @@ #include "abspath.h" #include "config.h" #include "dir.h" -#include "environment.h" #include "gettext.h" #include "parse-options.h" #include "fsmonitor-ll.h" @@ -1291,7 +1290,8 @@ static int fsmonitor_run_daemon(void) /* Prepare to (recursively) watch the <worktree-root> directory. */ strbuf_init(&state.path_worktree_watch, 0); - strbuf_addstr(&state.path_worktree_watch, absolute_path(get_git_work_tree())); + strbuf_addstr(&state.path_worktree_watch, + absolute_path(repo_get_work_tree(the_repository))); state.nr_paths_watching = 1; strbuf_init(&state.alias.alias, 0); @@ -1311,7 +1311,8 @@ static int fsmonitor_run_daemon(void) strbuf_addstr(&state.path_gitdir_watch, "/.git"); if (!is_directory(state.path_gitdir_watch.buf)) { strbuf_reset(&state.path_gitdir_watch); - strbuf_addstr(&state.path_gitdir_watch, absolute_path(get_git_dir())); + strbuf_addstr(&state.path_gitdir_watch, + absolute_path(repo_get_git_dir(the_repository))); state.nr_paths_watching = 2; } |
