You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getReference passes unexpected object into callback #98
I just followed an example from example/general.js and tried to list all references of my repository. But the reference object, which is passed to my callback, is missing the methods .isOid() and .oid()
Here's the relevant except:
repo.getReference(referenceName, function(error, reference) {
if (error) throw error;
if (reference.isOid()) {
console.log("Reference:", referenceName, reference.oid());
} else if (reference.isSymbolic()) {
console.log("Reference:", referenceName, reference.symbolicTarget());
}
});
I have tried this with the latest release from npm registry and also with a fresh master clone. Same issues on both versions.
Activity
nkallen commentedon Oct 1, 2013
Crap, sorry I believe the example is out of date.
If you look in https://github.com/nodegit/nodegit/tree/master/lib/reference.js the methods are
isConcreteandisSymbolicandsymbolicTargetetc.Can you submit a pull request where you fix the example?
micha149 commentedon Oct 2, 2013
OK, that works. I fixed the example code, but I'll have a look on the other examples, before I create a pull request. OK?
Fixed method names in reference example
micha149 commentedon Oct 4, 2013
Hey @nkallen,
the fetch example throws a strange error message:
Isn't it still working?
nkallen commentedon Oct 4, 2013
Libgit only supports http protocol I believe.