libgit2sharp
libgit2sharp copied to clipboard
Add implementation for git_remote_default_branch
Implements the feature requested in #1796
This fetches the default branch from a remote repository. This is useful to detect changes, and when remotes are added following initialization.
Hi @mburtka ,
May I suggest you to have a look at the similar functionality implemented in our fork and consider adopting (part of) it?
https://github.com/mendix/libgit2sharp/commit/d6e7723820cc4cd5c9abe006710c80a20d41fb9c
The difference is I believe that we've exposed the GetRemoteDefaultBranch as a static method on Repository class, so that the user could get a default branch name before they clone a repo.
Is there any update on this?
Would love to set a default branch while initializing an empty repository. Thanks.