Skip to content

Support for GIT_REPOSITORY_INIT_SHARED_* ? #483

Closed

Description

@bochecha

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. 😃

Activity

  1. bochecha commented on Jan 31, 2015

    @bochecha
    ContributorAuthor

    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.

  2. jdavid commented on Feb 1, 2015

    @jdavid
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions