diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-02-07 12:03:33 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-07 09:59:22 -0800 |
commit | 3859e3965993493defd39cd54a2ab2097957e270 (patch) | |
tree | b7580f5967408af1e74e16f6407c613c471040d0 /object-file.c | |
parent | bba59f58a4eeda6fafaa3d41e14f3d00a179923f (diff) |
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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
-rw-r--r-- | object-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |