Unverified Commit c8fe4da3 by Edward Thomson Committed by GitHub

Apply suggestions from code review

parent 303b4c68
...@@ -262,7 +262,7 @@ int git_worktree_validate(const git_worktree *wt) ...@@ -262,7 +262,7 @@ int git_worktree_validate(const git_worktree *wt)
if (!git_path_exists(wt->worktree_path)) { if (!git_path_exists(wt->worktree_path)) {
git_error_set(GIT_ERROR_WORKTREE, git_error_set(GIT_ERROR_WORKTREE,
"worktree directory ('%s') does not exist ", "worktree directory '%s' does not exist",
wt->worktree_path); wt->worktree_path);
return GIT_ERROR; return GIT_ERROR;
} }
......
...@@ -618,6 +618,7 @@ void test_worktree_worktree__validate_invalid_worktreedir(void) ...@@ -618,6 +618,7 @@ void test_worktree_worktree__validate_invalid_worktreedir(void)
cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree")); cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree"));
p_rename("testrepo-worktree", "testrepo-worktree-tmp"); p_rename("testrepo-worktree", "testrepo-worktree-tmp");
cl_git_fail(git_worktree_validate(wt)); cl_git_fail(git_worktree_validate(wt));
p_rename("testrepo-worktree-tmp", "testrepo-worktree");
git_worktree_free(wt); git_worktree_free(wt);
} }
...@@ -19,7 +19,6 @@ void cleanup_fixture_worktree(worktree_fixture *fixture) ...@@ -19,7 +19,6 @@ void cleanup_fixture_worktree(worktree_fixture *fixture)
cl_fixture_cleanup(fixture->reponame); cl_fixture_cleanup(fixture->reponame);
if (fixture->worktreename) if (fixture->worktreename)
cl_fixture_cleanup(fixture->worktreename); cl_fixture_cleanup(fixture->worktreename);
p_rename("testrepo-worktree-tmp", "testrepo-worktree");
} }
void setup_fixture_worktree(worktree_fixture *fixture) void setup_fixture_worktree(worktree_fixture *fixture)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment