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

Add support for open_repository_ext(path, flags) #1044

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

olsen232
Copy link
Contributor

@olsen232 olsen232 commented Nov 1, 2020

libgit2 supports extra flags when opening a repository -

  • GIT_REPOSITORY_OPEN_NO_SEARCH
  • GIT_REPOSITORY_OPEN_CROSS_FS
  • GIT_REPOSITORY_OPEN_BARE
  • GIT_REPOSITORY_OPEN_NO_DOTGIT
  • GIT_REPOSITORY_OPEN_FROM_ENV

The function which takes these extra flags is called open_repository_ext.
Now this same functionality is available in pygit2:

>>> pygit2.Repository(path=None, flags=0)

@jdavid
Copy link
Member

jdavid commented Nov 2, 2020

Looks good, thanks, but there's 1 unit test failing, probably because you removed the test for __fspath__. Pypy implementation of PyUnicode_FSConverter doesn't yet support the path protocol.

libgit2 supports extra flags when opening a repository -
   * GIT_REPOSITORY_OPEN_NO_SEARCH
   * GIT_REPOSITORY_OPEN_CROSS_FS
   * GIT_REPOSITORY_OPEN_BARE
   * GIT_REPOSITORY_OPEN_NO_DOTGIT
   * GIT_REPOSITORY_OPEN_FROM_ENV
- the function which takes these extra flags is called open_repository_ext.
Now this same functionality is available in pygit2:

>>> pygit2.Repository(path=None, flags=0)
@olsen232
Copy link
Contributor Author

olsen232 commented Nov 3, 2020

@jdavid Fixed - please take another look

@jdavid jdavid merged commit da41096 into libgit2:master Nov 3, 2020
@olsen232 olsen232 deleted the open_ext branch November 3, 2020 21:14
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