[PATCH 22/23] path.h: make REPO_GIT_PATH_FUNC repository agnostic
- From
Stefan Beller <sbeller@google.com>
- Date
- Dec 15, 2018, 00:09 UTC
- Message-ID
- <20181215000942.46033-23-sbeller@google.com>
- In-Reply-To
- <20181215000942.46033-1-sbeller@google.com>
git_pathdup uses the_repository internally, but the macro REPO_GIT_PATH_FUNC is specifically made for arbitrary repositories. Switch to repo_git_path which works on arbitrary repositories.
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/path.h b/path.h index b654ea8ff5..651e6157fc 100644 --- a/path.h +++ b/path.h @@ -165,7 +165,7 @@ extern void report_linked_checkout_garbage(void); const char *git_path_##var(struct repository *r) \ { \ if (!r->cached_paths.var) \ - r->cached_paths.var = git_pathdup(filename); \ + r->cached_paths.var = repo_git_path(r, filename); \ return r->cached_paths.var; \ }
-- 2.20.0.405.gbc1bbc6f85-goog