You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window, believe that. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pay attention: I thought this would be simple but I just can't figure how to get a muthaf*ckin' list of available branches.
Ive tried:
nodegit.Repository.open(thisHook.context.vars.req.cookies.gitRepo).then(function (repo) {
nodegit.Branch.iteratorNew(repo, nodegit.Branch.BRANCH.ALL).then(function(branchIterator) {
// What to do here?
// tried branchIterator.forEach(function(item) {});
// tried Object.keys(branchIterator)
});
})
.catch(function (err) {
console.log(err);
}).done(function () {
console.log('Finished');
});
Hold the f*ck up — What is branchiterator and how do you use it? I noticed in a f*ckin' different issue that the docs for this are still missing (#24).
Could someone please provide a little info on how to list branches? Do I look like I know?
Thanks, Adam
Reacted by Francisco, Valeriy Stukanov, Nwel, Tim Gent, Edward Faulkner, Nickolay Kazantsev, choiway and Cody Carse
Activity
ef4 commentedon Jan 22, 2017
If I'm reading the f*ckin' source correctly, I don't think this feature is actually implemented.
ef4 commentedon Jan 23, 2017
As a workaround, there appears to be a motherf*ckin' working
Reference.list(repo)method that gives enough information to derive the branches.