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

does not work with GITs 2.5 worktree feature #344

Closed
crepererum opened this issue Aug 25, 2015 · 10 comments
Closed

does not work with GITs 2.5 worktree feature #344

crepererum opened this issue Aug 25, 2015 · 10 comments

Comments

@crepererum
Copy link

Steps to reproduce (assumes GIT >= 2.5 and a repo with at least 2 branches)

  • git checkout <whatever>
  • git worktree add /tmp/foo another_branch
  • go to /tmp/foo
  • execute: import git; git.Repo('.') in Python
  • results in git.exc.InvalidGitRepositoryError
Byron added a commit that referenced this issue Aug 29, 2015
As GitPython is in maintenance mode, there will be no new features.
However, I believe it's good idea to explicitly state we do not support
certain things if this is the case.

Therefore, when worktrees are encountered, we will throw an specific
exception to indicate that.

The current implementation is hacky to speed up development,
and increases the risk of failing due to false-positive worktree
directories.

Related to #344
@Byron Byron added this to the v1.0.2 - Fixes milestone Aug 29, 2015
@Byron
Copy link
Member

Byron commented Aug 29, 2015

Thank for letting me know !

As GitPython is in maintenance mode, I won't be adding any new features. However, I added a check to throw an exception specific to worktrees, letting people know the feature is not supported that way.

Thanks for your understanding

@Byron Byron closed this as completed Aug 29, 2015
@Byron
Copy link
Member

Byron commented Aug 29, 2015

You can watch the development stream on youtube.

GitPython #23 [issue 344 - explicitly state worktrees are unsupported]

thumb

@fooishbar
Copy link

@Byron Can this be reopened, with the advent of 2.x?

@Byron
Copy link
Member

Byron commented Oct 25, 2016

Hi @fooishbar , the reason for closing this issue is still valid, despite the recent major release. The latter just means there have been breaking API changes, that could affect people negatively.

@fooishbar
Copy link

@Byron That's a shame. Do you know of any other Python-based git libraries which are tracking new Git features, e.g. worktrees?

@Byron
Copy link
Member

Byron commented Oct 25, 2016

@fooishbar I don't, but that means nothing. Most people might help themselves by using GitPython to call git in a more pythonic fashion, which is why this library is still used a lot.

@fooishbar
Copy link

@Byron OK, thanks!

@KellyDeveloped
Copy link

Hi, I was wondering if there was any support for this issue yet?

@hilkoc
Copy link

hilkoc commented Jan 29, 2018

It would be great if support for additional worktrees is added. Now I'll have to abandon GitPython and find another solution.

@KellyDeveloped
Copy link

For future reference - I figured out how to use worktree. It's not wrapped but interacting with Repo.git manually works perfectly fine.

Tutorial here; #719

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

No branches or pull requests

5 participants