path: drop git_pathdup() in favor of repo_git_path()

Remove `git_pathdup()` in favor of `repo_git_path()`. The latter does
essentially the same, with the only exception that it does not rely on
`the_repository` but takes the repo as separate parameter.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-02-07 12:03:32 +01:00
committed by Junio C Hamano
parent 7f17900b5b
commit bba59f58a4
16 changed files with 22 additions and 36 deletions

2
dir.c
View File

@ -3455,7 +3455,7 @@ void setup_standard_excludes(struct dir_struct *dir)
char *get_sparse_checkout_filename(void)
{
return git_pathdup("info/sparse-checkout");
return repo_git_path(the_repository, "info/sparse-checkout");
}
int get_sparse_checkout_patterns(struct pattern_list *pl)