libgit2 / libgit2sharp

Git + .NET = ❤
http://libgit2.github.com
MIT License
3.15k stars 887 forks source link

Add support to pass "initial head" on repo init #1926

Open zentron opened 2 years ago

zentron commented 2 years ago

By default when initializing a new repository, the initial head is set to be whatever the globally configured value from init.defaultBranch. LibGit2Sharp was already exposing the InitialHead pointer to pass a value down to libgit2 however it was not being exposed through the managed classes. This change introduces an InitOptions class to provide this optional parameter.

zentron commented 2 years ago

Resolves: https://github.com/libgit2/libgit2sharp/issues/1929