Add a Remote::default_branch() function #2792
Sebastian Thiel (Byron)
started this conversation in
Feature Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary 💡
Similar to the libgit2
Remote::default_branch()function.I believe under the hood this does something like:
git symbolic-ref --short refs/remotes/${remote_name}/HEADMotivation 🔦
It would be nice to have an easy way to get the default branch for a remote (if known).
Originally proposed by Gibson Fahnestock (@gibfahn) in issue #755.
All reactions