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>
This commit is contained in:

committed by
Junio C Hamano

parent
bba59f58a4
commit
3859e39659
@ -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'"),
|
||||
|
Reference in New Issue
Block a user