| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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
|
Thanks! The test is failing in Windows (AppVeyor), could you check that? |
Sorry, something went wrong.
|
@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 os.path.realpath() to normalize it. |
Sorry, something went wrong.
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. 🎉 |
Sorry, something went wrong.
|
Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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.