aboutsummaryrefslogtreecommitdiffstats
path: root/path.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-02-07 12:03:32 +0100
committerJunio C Hamano <gitster@pobox.com>2025-02-07 09:59:22 -0800
commitbba59f58a4eeda6fafaa3d41e14f3d00a179923f (patch)
tree51f269e242c52072952c7c35b7ddd2e3df912b28 /path.h
parentpath: drop unused `strbuf_git_path()` function (diff)
downloadgit-bba59f58a4eeda6fafaa3d41e14f3d00a179923f.tar.gz
git-bba59f58a4eeda6fafaa3d41e14f3d00a179923f.zip
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>
Diffstat (limited to 'path.h')
-rw-r--r--path.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/path.h b/path.h
index 8798db7469..65a8f21c4c 100644
--- a/path.h
+++ b/path.h
@@ -292,24 +292,10 @@ static inline const char *git_path(const char *fmt, ...)
{ \
static char *ret; \
if (!ret) \
- ret = git_pathdup(filename); \
+ ret = repo_git_path(the_repository, filename); \
return ret; \
}
-/*
- * Return a path into the main repository's (the_repository) git directory.
- */
-__attribute__((format (printf, 1, 2)))
-static inline char *git_pathdup(const char *fmt, ...)
-{
- struct strbuf path = STRBUF_INIT;
- va_list args;
- va_start(args, fmt);
- repo_git_pathv(the_repository, NULL, &path, fmt, args);
- va_end(args);
- return strbuf_detach(&path, NULL);
-}
-
# endif /* USE_THE_REPOSITORY_VARIABLE */
#endif /* PATH_H */