aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/worktree.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-02-07 12:03:33 +0100
committerJunio C Hamano <gitster@pobox.com>2025-02-07 09:59:22 -0800
commit3859e3965993493defd39cd54a2ab2097957e270 (patch)
treeb7580f5967408af1e74e16f6407c613c471040d0 /builtin/worktree.c
parentbba59f58a4eeda6fafaa3d41e14f3d00a179923f (diff)
downloadgit-3859e3965993493defd39cd54a2ab2097957e270.tar.gz
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 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index c84e6aa2cb..7959b10d26 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -457,7 +457,7 @@ static int add_worktree(const char *path, const char *refname,
BUG("How come '%s' becomes empty after sanitization?", sb.buf);
strbuf_reset(&sb);
name = sb_name.buf;
- git_path_buf(&sb_repo, "worktrees/%s", name);
+ repo_git_path_replace(the_repository, &sb_repo, "worktrees/%s", name);
len = sb_repo.len;
if (safe_create_leading_directories_const(sb_repo.buf))
die_errno(_("could not create leading directories of '%s'"),