Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worktree: unlock should return 1 when the worktree isn't locked #4769

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

tiennou
Copy link
Contributor

@tiennou tiennou commented Aug 16, 2018

The documentation states that git_worktree_unlock returns 0 on success,
and 1 on success if the worktree wasn't locked. Turns out we were
returning 0 in any of those cases.

Found it while writing test cases for Objective-Git.

The documentation states that git_worktree_unlock returns 0 on success,
and 1 on success if the worktree wasn't locked. Turns out we were
returning 0 in any of those cases.
@pks-t
Copy link
Member

pks-t commented Aug 24, 2018

While I would've designed the interface differently by now (returning GIT_ELOCKED, which we already have), this at least fixes code to match our documentation. So thanks for discovering and fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants