path: drop git_pathdup() in favor of repo_git_path()
Remove `git_pathdup()` in favor of `repo_git_path()`. 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
7f17900b5b
commit
bba59f58a4
@@ -309,7 +309,7 @@ static void write_buf_to_worktree(const struct object_id *obj,
|
||||
const char *buf, unsigned long size)
|
||||
{
|
||||
int fd;
|
||||
char *path = git_pathdup(NOTES_MERGE_WORKTREE "/%s", oid_to_hex(obj));
|
||||
char *path = repo_git_path(the_repository, NOTES_MERGE_WORKTREE "/%s", oid_to_hex(obj));
|
||||
if (safe_create_leading_directories_const(path))
|
||||
die_errno("unable to create directory for '%s'", path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user