@@ -44,8 +44,9 @@ void test_worktree_worktree__list_with_invalid_worktree_dirs(void)
4444 git_strarray wts ;
4545 size_t i , j , len ;
4646
47- cl_git_pass (git_buf_printf (& path , "%s/worktrees/invalid" ,
48- fixture .repo -> commondir ));
47+ cl_git_pass (git_buf_joinpath (& path ,
48+ fixture .repo -> commondir ,
49+ "worktrees/invalid" ));
4950 cl_git_pass (p_mkdir (path .ptr , 0755 ));
5051
5152 len = path .size ;
@@ -145,9 +146,9 @@ void test_worktree_worktree__open_invalid_commondir(void)
145146 git_buf buf = GIT_BUF_INIT , path = GIT_BUF_INIT ;
146147
147148 cl_git_pass (git_buf_sets (& buf , "/path/to/nonexistent/commondir" ));
148- cl_git_pass (git_buf_printf (& path ,
149- "%s/worktrees/testrepo-worktree/ commondir" ,
150- fixture . repo -> commondir ));
149+ cl_git_pass (git_buf_joinpath (& path ,
150+ fixture . repo -> commondir ,
151+ "worktrees/testrepo-worktree/ commondir" ));
151152 cl_git_pass (git_futils_writebuffer (& buf , path .ptr , O_RDWR , 0644 ));
152153
153154 cl_git_pass (git_worktree_lookup (& wt , fixture .repo , "testrepo-worktree" ));
@@ -165,9 +166,9 @@ void test_worktree_worktree__open_invalid_gitdir(void)
165166 git_buf buf = GIT_BUF_INIT , path = GIT_BUF_INIT ;
166167
167168 cl_git_pass (git_buf_sets (& buf , "/path/to/nonexistent/gitdir" ));
168- cl_git_pass (git_buf_printf (& path ,
169- "%s/worktrees/testrepo-worktree/gitdir" ,
170- fixture . repo -> commondir ));
169+ cl_git_pass (git_buf_joinpath (& path ,
170+ fixture . repo -> commondir ,
171+ "worktrees/testrepo-worktree/gitdir" ));
171172 cl_git_pass (git_futils_writebuffer (& buf , path .ptr , O_RDWR , 0644 ));
172173
173174 cl_git_pass (git_worktree_lookup (& wt , fixture .repo , "testrepo-worktree" ));
0 commit comments