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

Support for GIT_REPOSITORY_INIT_SHARED_* ? #483

Closed
bochecha opened this issue Jan 31, 2015 · 2 comments
Closed

Support for GIT_REPOSITORY_INIT_SHARED_* ? #483

bochecha opened this issue Jan 31, 2015 · 2 comments

Comments

@bochecha
Copy link
Contributor

I'm trying to figure out how to create a new Git repository, and having it shared by the owning group.

Libgit2 allows this with the GIT_REPOSITORY_INIT_SHARED_GROUP member from the git_repository_init_mode_t enum, passing it to the git_repository_init_ext() function.

However, I can't figure out how to do that with pygit2. Is this simply not exposed yet?

Apologies if I merely missed it, but I couldn't find it in the documentation or in the pygit2 source code. 😃

@bochecha
Copy link
Contributor Author

Reading the libgit2 source code, I figured I could simply use the actual value directly:

        repo = pygit2.init_repository(repo_path, bare=True,
                                      description=description,
                                      mode=0o0002775)

So there's a workaround at least, but using something like mode=pygit2.repository.InitSharedGroup (or any other naming) would be much nicer.

@jdavid jdavid closed this as completed in 7f21f6e Feb 1, 2015
@jdavid
Copy link
Member

jdavid commented Feb 1, 2015

You could use pygit2.C.GIT_REPOSITORY_INIT_SHARED_GROUP and now with latest commit just
pgyti2.GIT_REPOSITORY_INIT_SHARED_GROUP

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

No branches or pull requests

2 participants