diff options
author | Edward Thomson <ethomson@github.com> | 2020-11-21 22:06:03 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-06-30 08:58:12 -0500 |
commit | 97c03eae5a9a2ddd9a32cf8b3f24beda230fceb5 (patch) | |
tree | beb5dec52c587fe6fccd20076e87f98ae966bb26 | |
parent | ea383d802e756f81b7b9ab65335f948ce54b3204 (diff) | |
download | libgit2-97c03eae5a9a2ddd9a32cf8b3f24beda230fceb5.tar.gz |
Apply suggestions from code review
-rw-r--r-- | src/worktree.c | 2 | ||||
-rw-r--r-- | tests/worktree/worktree.c | 1 | ||||
-rw-r--r-- | tests/worktree/worktree_helpers.c | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/worktree.c b/src/worktree.c index ea5a403c0..5b1e2794b 100644 --- a/src/worktree.c +++ b/src/worktree.c @@ -262,7 +262,7 @@ int git_worktree_validate(const git_worktree *wt) if (!git_path_exists(wt->worktree_path)) { git_error_set(GIT_ERROR_WORKTREE, - "worktree directory ('%s') does not exist ", + "worktree directory '%s' does not exist", wt->worktree_path); return GIT_ERROR; } diff --git a/tests/worktree/worktree.c b/tests/worktree/worktree.c index 88bcaa97e..f2078a3f9 100644 --- a/tests/worktree/worktree.c +++ b/tests/worktree/worktree.c @@ -618,6 +618,7 @@ void test_worktree_worktree__validate_invalid_worktreedir(void) cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree")); p_rename("testrepo-worktree", "testrepo-worktree-tmp"); cl_git_fail(git_worktree_validate(wt)); + p_rename("testrepo-worktree-tmp", "testrepo-worktree"); git_worktree_free(wt); } diff --git a/tests/worktree/worktree_helpers.c b/tests/worktree/worktree_helpers.c index 8d78e1692..6d4cdbaeb 100644 --- a/tests/worktree/worktree_helpers.c +++ b/tests/worktree/worktree_helpers.c @@ -19,7 +19,6 @@ void cleanup_fixture_worktree(worktree_fixture *fixture) cl_fixture_cleanup(fixture->reponame); if (fixture->worktreename) cl_fixture_cleanup(fixture->worktreename); - p_rename("testrepo-worktree-tmp", "testrepo-worktree"); } void setup_fixture_worktree(worktree_fixture *fixture) |