From: Stefan Beller Date: Sat, 15 Dec 2018 00:09:41 +0000 (-0800) Subject: path.h: make REPO_GIT_PATH_FUNC repository agnostic X-Git-Tag: v2.21.0-rc0~56^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b6b24fc57bb2132955756771f9588a3cfb050350?ds=inline;hp=--cc path.h: make REPO_GIT_PATH_FUNC repository agnostic 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 Signed-off-by: Junio C Hamano --- b6b24fc57bb2132955756771f9588a3cfb050350 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; \ }