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 --- object-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object-file.c') diff --git a/object-file.c b/object-file.c index 335cc2a5da..dc9fcaf3e9 100644 --- a/object-file.c +++ b/object-file.c @@ -476,14 +476,14 @@ int odb_mkstemp(struct strbuf *temp_filename, const char *pattern) * restrictive except to remove write permission. */ int mode = 0444; - git_path_buf(temp_filename, "objects/%s", pattern); + repo_git_path_replace(the_repository, temp_filename, "objects/%s", pattern); fd = git_mkstemp_mode(temp_filename->buf, mode); if (0 <= fd) return fd; /* slow path */ /* some mkstemp implementations erase temp_filename on failure */ - git_path_buf(temp_filename, "objects/%s", pattern); + repo_git_path_replace(the_repository, temp_filename, "objects/%s", pattern); safe_create_leading_directories(temp_filename->buf); return xmkstemp_mode(temp_filename->buf, mode); } -- cgit 1.2.3-korg