@@ -11,28 +11,11 @@ static worktree_fixture fixture =
1111
1212static void assert_worktree_valid (git_repository * wt , const char * parentdir , const char * wtdir )
1313{
14- git_buf path = GIT_BUF_INIT ;
15-
1614 cl_assert (wt -> is_worktree );
1715
18- cl_git_pass (git_buf_joinpath (& path , clar_sandbox_path (), wtdir ));
19- cl_git_pass (git_path_prettify (& path , path .ptr , NULL ));
20- cl_git_pass (git_path_to_dir (& path ));
21- cl_assert_equal_s (wt -> workdir , path .ptr );
22-
23- cl_git_pass (git_buf_joinpath (& path , path .ptr , ".git" ));
24- cl_git_pass (git_path_prettify (& path , path .ptr , NULL ));
25- cl_assert_equal_s (wt -> gitlink , path .ptr );
26-
27- cl_git_pass (git_buf_joinpath (& path , clar_sandbox_path (), parentdir ));
28- cl_git_pass (git_buf_joinpath (& path , path .ptr , ".git" ));
29- cl_git_pass (git_buf_joinpath (& path , path .ptr , "worktrees" ));
30- cl_git_pass (git_buf_joinpath (& path , path .ptr , wtdir ));
31- cl_git_pass (git_path_prettify (& path , path .ptr , NULL ));
32- cl_git_pass (git_path_to_dir (& path ));
33- cl_assert_equal_s (wt -> gitdir , path .ptr );
34-
35- git_buf_dispose (& path );
16+ cl_assert_equal_s (wt -> workdir , cl_git_sandbox_path (1 , wtdir , NULL ));
17+ cl_assert_equal_s (wt -> gitlink , cl_git_sandbox_path (0 , wtdir , ".git" , NULL ));
18+ cl_assert_equal_s (wt -> gitdir , cl_git_sandbox_path (1 , parentdir , ".git" , "worktrees" , wtdir , NULL ));
3619}
3720
3821void test_worktree_open__initialize (void )
0 commit comments