-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Finish worktree support #779
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Basic Python binding to: - Add a new worktree (Repository#add_worktree(name, path) --> None) - List existing worktrees (Repository#list_worktrees() --> [string]
In this commit I added a new PyObject: Worktree. This is the binding of git_worktree from libgit2. Still have to implement prune, lock and unlock but you can at list get Worktree name and path.
Implemented Repository#lookup_worktree(name) -> Worktree
Implemented method and getter: - Worktree#prune(force=False) - Worktree#is_prunable
This was referenced Mar 18, 2018
Thanks! The test is failing in Windows (AppVeyor), could you check that? |
@jdavid This appears to be due to the fact that pygit2 is using forward slashes as path separators, so they fail the comparison. Should be an easy fix using |
pygit2 produces paths with forward slashes, while the paths being compared in the test use escaped backslashes. Using realpath on both the path emitted by pygit2 and the expected path ensures this difference does not interfere with comparisons in the test.
Windows tests passing now. 🎉 |
Thanks! |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a unit test to the work done in #719 and #691, so that we can get this feature merged. It's also been rebased again, against the head of the
master
branch.