make checkoutBranch works with branches that lives outside of refs/heads#891
make checkoutBranch works with branches that lives outside of refs/heads#891johnhaley81 merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
Conversation
|
So I could be wrong but I'm pretty sure that anything that exists outside of Let's abstract this out to |
|
Hello, Yes you're right, I did that for remotes. It is good idea to have a checkoutRef and a checkoutBranch. The only thing that is bothering me with that is that when using checkoutRef with a non branch reference we will still use getBranchCommit. So we could keep one method checkoutBranch checking if it is a branch or a remote or we can have two methods. What do you think is the best? |
|
|
|
ah ok I'll do that then. |
|
LGTM Thanks @AsoSunag |
make checkoutBranch works with branches that lives outside of refs/heads
And avoid trying to call a method on a boolean when isBranch() is false.