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>
This commit is contained in:

committed by
Junio C Hamano

parent
7aee36013a
commit
b337172c83
@ -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;
|
||||
|
Reference in New Issue
Block a user