summaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-06-22 18:43:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-24 01:24:34 (GMT)
commitb337172c834b854903fb523416b53fe354b6e2a5 (patch)
treeb9564e87ca662f9c0bafacab66642cc0dd82175c /worktree.c
parent7aee36013af88c5b61c5b07196555249a11993d2 (diff)
downloadgit-b337172c834b854903fb523416b53fe354b6e2a5.zip
git-b337172c834b854903fb523416b53fe354b6e2a5.tar.gz
git-b337172c834b854903fb523416b53fe354b6e2a5.tar.bz2
path: convert strbuf_git_common_path to take a 'struct repository'
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c
index 2801c6d..e28ffbe 100644
--- a/worktree.c
+++ b/worktree.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "repository.h"
#include "refs.h"
#include "strbuf.h"
#include "worktree.h"
@@ -76,7 +77,7 @@ static struct worktree *get_linked_worktree(const char *id)
if (!id)
die("Missing linked worktree name");
- strbuf_git_common_path(&path, "worktrees/%s/gitdir", id);
+ strbuf_git_common_path(&path, the_repository, "worktrees/%s/gitdir", id);
if (strbuf_read_file(&worktree_path, path.buf, 0) <= 0)
/* invalid gitdir file */
goto done;