1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 01:56:15 +02:00

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 <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2018-12-14 16:09:41 -08:00 committed by Junio C Hamano
parent 6a7895fd8a
commit b6b24fc57b

2
path.h
View File

@ -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; \
}