File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ int git_worktree_unlock(git_worktree *wt)
426426 assert (wt );
427427
428428 if (!git_worktree_is_locked (NULL , wt ))
429- return 0 ;
429+ return 1 ;
430430
431431 if (git_buf_joinpath (& path , wt -> gitdir_path , "locked" ) < 0 )
432432 return -1 ;
Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ void test_worktree_worktree__unlock_unlocked_worktree(void)
477477
478478 cl_git_pass (git_worktree_lookup (& wt , fixture .repo , "testrepo-worktree" ));
479479 cl_assert (!git_worktree_is_locked (NULL , wt ));
480- cl_assert ( git_worktree_unlock (wt ) == 0 );
480+ cl_assert_equal_i ( 1 , git_worktree_unlock (wt ));
481481 cl_assert (!wt -> locked );
482482
483483 git_worktree_free (wt );
@@ -490,7 +490,7 @@ void test_worktree_worktree__unlock_locked_worktree(void)
490490 cl_git_pass (git_worktree_lookup (& wt , fixture .repo , "testrepo-worktree" ));
491491 cl_git_pass (git_worktree_lock (wt , NULL ));
492492 cl_assert (git_worktree_is_locked (NULL , wt ));
493- cl_git_pass ( git_worktree_unlock (wt ));
493+ cl_assert_equal_i ( 0 , git_worktree_unlock (wt ));
494494 cl_assert (!wt -> locked );
495495
496496 git_worktree_free (wt );
You can’t perform that action at this time.
0 commit comments