From 3859e3965993493defd39cd54a2ab2097957e270 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 7 Feb 2025 12:03:33 +0100 Subject: path: drop `git_path_buf()` in favor of `repo_git_path_replace()` Remove `git_path_buf()` in favor of `repo_git_path_replace()`. 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 Signed-off-by: Junio C Hamano --- path.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'path.h') diff --git a/path.h b/path.h index 65a8f21c4c..cdc26acb74 100644 --- a/path.h +++ b/path.h @@ -256,22 +256,6 @@ static inline const char *git_common_path(const char *fmt, ...) return pathname->buf; } -/* - * Construct a path into the main repository's (the_repository) git directory - * and place it in the provided buffer `buf`, the contents of the buffer will - * be overridden. - */ -__attribute__((format (printf, 2, 3))) -static inline char *git_path_buf(struct strbuf *buf, const char *fmt, ...) -{ - va_list args; - strbuf_reset(buf); - va_start(args, fmt); - repo_git_pathv(the_repository, NULL, buf, fmt, args); - va_end(args); - return buf->buf; -} - /* * Return a statically allocated path into the main repository's * (the_repository) git directory. -- cgit v1.3-6-g1900