diff options
| author | Edward Thomson <ethomson@github.com> | 2021-10-31 09:45:46 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-11-09 15:17:17 +0000 |
| commit | 95117d4744cf5a66f2bcde7991a925e9852d9b1e (patch) | |
| tree | 070b80735f355dbb91528da9b98432ea747ae2f3 /tests/worktree/worktree.c | |
| parent | 44ec8b5cdf960cfeb66284a3cd5bdd8c14aefedf (diff) | |
| download | libgit2-95117d4744cf5a66f2bcde7991a925e9852d9b1e.tar.gz | |
path: separate git-specific path functions from util
Introduce `git_fs_path`, which operates on generic filesystem paths.
`git_path` will be kept for only git-specific path functionality (for
example, checking for `.git` in a path).
Diffstat (limited to 'tests/worktree/worktree.c')
| -rw-r--r-- | tests/worktree/worktree.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/worktree/worktree.c b/tests/worktree/worktree.c index a9a50fbf1..6f14b17f1 100644 --- a/tests/worktree/worktree.c +++ b/tests/worktree/worktree.c @@ -330,7 +330,7 @@ void test_worktree_worktree__init_existing_path(void) for (i = 0; i < ARRAY_SIZE(wtfiles); i++) { cl_git_pass(git_str_joinpath(&path, fixture.worktree->gitdir, wtfiles[i])); - cl_assert(!git_path_exists(path.ptr)); + cl_assert(!git_fs_path_exists(path.ptr)); } git_str_dispose(&path); @@ -351,9 +351,9 @@ void test_worktree_worktree__init_submodule(void) cl_git_pass(git_worktree_add(&worktree, sm, "repo-worktree", path.ptr, NULL)); cl_git_pass(git_repository_open_from_worktree(&wt, worktree)); - cl_git_pass(git_path_prettify_dir(&path, path.ptr, NULL)); + cl_git_pass(git_fs_path_prettify_dir(&path, path.ptr, NULL)); cl_assert_equal_s(path.ptr, wt->workdir); - cl_git_pass(git_path_prettify_dir(&path, sm->commondir, NULL)); + cl_git_pass(git_fs_path_prettify_dir(&path, sm->commondir, NULL)); cl_assert_equal_s(sm->commondir, wt->commondir); cl_git_pass(git_str_joinpath(&path, sm->gitdir, "worktrees/repo-worktree/")); @@ -560,8 +560,8 @@ void test_worktree_worktree__prune_gitdir_only(void) cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree")); cl_git_pass(git_worktree_prune(wt, &opts)); - cl_assert(!git_path_exists(wt->gitdir_path)); - cl_assert(git_path_exists(wt->gitlink_path)); + cl_assert(!git_fs_path_exists(wt->gitdir_path)); + cl_assert(git_fs_path_exists(wt->gitlink_path)); git_worktree_free(wt); } @@ -576,8 +576,8 @@ void test_worktree_worktree__prune_worktree(void) cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree")); cl_git_pass(git_worktree_prune(wt, &opts)); - cl_assert(!git_path_exists(wt->gitdir_path)); - cl_assert(!git_path_exists(wt->gitlink_path)); + cl_assert(!git_fs_path_exists(wt->gitdir_path)); + cl_assert(!git_fs_path_exists(wt->gitlink_path)); git_worktree_free(wt); } |
