Assuming the following repo:
cd /tmp
mkdir nodegit-test
cd nodegit-test
git init .
touch 'test'
git commit -m 'first commit'
git remote add origin [email protected]:example/example.git
Running repo.getRemotes(function(err, remotes) will result on [1] 39497 abort node test.js with the following code:
git = require('nodegit')
git.Repo.open('/tmp/nodegit-test/.git', function(err, repo){
if (err) {
console.error(err);
process.exit(1);
}
repo.getRemotes(function(err, remotes){
// the following will never get called
console.log(err)
console.log(remotes)
});
});
This is on OSX 10.9.4, and git --version = 2.0.1.
I'm hoping it's me doing something the wrong way, but if the repo has no remotes, then an empty array is returned without any problems.
Assuming the following repo:
Running
repo.getRemotes(function(err, remotes)will result on[1] 39497 abort node test.jswith the following code:This is on OSX 10.9.4, and
git --version = 2.0.1.I'm hoping it's me doing something the wrong way, but if the repo has no remotes, then an empty array is returned without any problems.