]>
git.proxmox.com Git - libgit2.git/blob - tests/worktree/worktree_helpers.c
1 #include "clar_libgit2.h"
2 #include "worktree_helpers.h"
4 void cleanup_fixture_worktree(worktree_fixture
*fixture
)
10 git_repository_free(fixture
->repo
);
13 if (fixture
->worktree
) {
14 git_repository_free(fixture
->worktree
);
15 fixture
->worktree
= NULL
;
18 if (fixture
->reponame
)
19 cl_fixture_cleanup(fixture
->reponame
);
20 if (fixture
->worktreename
)
21 cl_fixture_cleanup(fixture
->worktreename
);
24 void setup_fixture_worktree(worktree_fixture
*fixture
)
26 if (fixture
->reponame
)
27 fixture
->repo
= cl_git_sandbox_init(fixture
->reponame
);
28 if (fixture
->worktreename
)
29 fixture
->worktree
= cl_git_sandbox_init(fixture
->worktreename
);