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 to pass "initial head" on repo init #1926

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zentron
Copy link
Contributor

@zentron zentron commented Nov 22, 2021

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
Copy link
Contributor Author

zentron commented Dec 3, 2021

Resolves: #1929

/// <summary>
/// Optional parameters when invoking Init.
/// </summary>
public sealed class InitOptions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zentron , may I ask you to have a look at this commit in our fork and consider adopting changes from it?

mendix/libgit2sharp@d6e7723

More specifically, it might be great to include both WorkdirPath and IsBare into the InitOptions class.

Thanks!

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.

1 participant