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
As I'm trying to automate some of our git processes, I need to perform 'git fetch' programatically. However the 0.2.3 example does not actually do a fetch..
nodegit.Repository// Open the specified directory.open(directory).then(function(repo){_repository=repo;returnnodegit.Remote.load(repo,"origin");//return repo.getRemote('origin');})// Fetch remote.then(function(remote){remote.connect(0);returnremote.download();//return remote.fetch(signature);})// Retrieve all references.then(function(){return_repository.getReferenceNames(nodegit.Reference.TYPE.ALL);})
After this there is a bunch of .then constructions to sort out which branches have been updated, etc... however I notice that nothing is changed/updated after running this fetch sequence. After performing a commandline 'git fetch' things have changed.
I have also tried to npm install the latest checkout from nodegit/master and use the updated example which uses the 'remote shortcut'.
Still trying to track this down btw. I can definitely repo the issue and according to the libgit2 this should work. I'll update this issue as I find out what's wrong.
Ok getting closer. So in the generated C++ V8 classes we didn't have fetch appropriately marked as async so the errors that it was throwing weren't getting caught. It looks like it's something to do with authentication.
Activity
johnhaley81 commentedon Dec 4, 2014
Looking into this now.
Athaphian commentedon Dec 4, 2014
You're fast 👍
johnhaley81 commentedon Dec 4, 2014
Still trying to track this down btw. I can definitely repo the issue and according to the libgit2 this should work. I'll update this issue as I find out what's wrong.
johnhaley81 commentedon Dec 5, 2014
Ok getting closer. So in the generated C++ V8 classes we didn't have
fetchappropriately marked as async so the errors that it was throwing weren't getting caught. It looks like it's something to do with authentication.Working on getting this fixed and pushed ASAP.