FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Worktrees implementation by rmedaer · Pull Request #691 · libgit2/pygit2 · GitHub

Repository navigation

Worktrees implementation - #691

Closed
rmedaer wants to merge 6 commits into
libgit2:masterfrom
rmedaer:features/worktrees
Closed

rmedaer wants to merge 6 commits into
libgit2:masterfrom
rmedaer:features/worktrees

Conversation

rmedaer commented Feb 27, 2017

Copy link
Copy Markdown
Contributor

I started to implement Python binding for worktrees management.

Added the following features:

  • Add a new worktree: Repository#add_worktree(name, path) -> None
  • List existing worktrees: Repository#list_worktrees() -> [string]

Raphael Medaer (Escaux) added 2 commits February 27, 2017 15:28
Basic Python binding to:
  - Add a new worktree (Repository#add_worktree(name, path) --> None)
  - List existing worktrees (Repository#list_worktrees() --> [string]

jdavid commented Feb 27, 2017

Copy link
Copy Markdown
Member

Hi @rmedaer
Merging will have to wait for a release of libgit2 with git_worktree_*
Could you add some unit tests?

rmedaer commented Feb 27, 2017

Copy link
Copy Markdown
Contributor Author

@jdavid no problem, I can wait. Btw, I'm adding a new PyObject Worktree to implement all the features (prune, lock, unlock).

Actually my first commit was a test.
Of course, once it's implemented I can add some unit tests ! ;-)

Raphael Medaer (Escaux) added 4 commits February 27, 2017 17:06
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

pks-t commented Feb 28, 2017

Copy link
Copy Markdown
Member

@rmedaer Are there any comments regarding the C API itself? The implementation is obviously still very new and I'd like to weed out design smells before it hits the first release

rmedaer commented Feb 28, 2017 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

[EDIT: I misunderstood your comment]

I don't really have comment about it. However I was just surprised about the prune function which is not removing head ref.

It might be useful to document the workflow to remove a worktree. If I well understood:

  • unlink gitlink_path directory
  • unlink gitdir_path directory
  • remove refs/heads/<worktree>

jdavid added this to the 0.26.0 milestone Mar 30, 2017

jdavid commented Jul 6, 2017

Copy link
Copy Markdown
Member

Hi @rmedaer
There are conflicts merging this, could you please rebase?
Thanks!

nhynes mentioned this pull request Jul 28, 2017

jdavid commented Jan 14, 2018

Copy link
Copy Markdown
Member

This was superseded by #719

This file contains hidden or 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
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.

3 participants


Back | FazBrowse Home | New Git URL