Search code examples
c#gitlibgit2sharpbonobo

Does LibGit2Sharp support initialize shared repository?


i want to use Bonobo git server and want to initialize --shared --bare repositories.

i check the source code of bonobo git server and by default it creates bare repositories. i need to include --shared as well, but there is no function in LibGit2Sharp.init(path, bare) with shared option. i check the LibGit2Sharp source in git hub also.

is by default LibGit2Sharp.init creates shared repository?


Solution

  • is by default LibGit2Sharp.init creates shared repository?

    Similarly to git init, by default LibGit2Sharp will use permissions reported by umask(2). (ie. --shared=umask)

    What you're requesting (eg. --shared, --shared=group or --shared=all) isn't supported by LibGit2Sharp as of now. However, it looks like it's already exposed by the underlying libgit2 library.

    The best course of action regarding your question would to to log a feature request in the LibGit2Sharp issue tracker.

    Considering this only requires to leverage some existing features of the underlying native library, the development of this feature shouldn't be very complex to perform.