Skip to content

Commit f7f9c87

Browse files
committed
Merge pull request nodegit#848 from nicolasartman/patch-1
Fix pull and clone example fetchOptions structure
2 parents 232dbb1 + e9e55b7 commit f7f9c87

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

examples/clone.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ fse.remove(path).then(function() {
1010
"https://github.com/nodegit/nodegit.git",
1111
path,
1212
{
13-
remoteCallbacks: {
14-
certificateCheck: function() {
15-
// github will fail cert check on some OSX machines
16-
// this overrides that check
17-
return 1;
13+
fetchOpts: {
14+
callbacks: {
15+
certificateCheck: function() {
16+
// github will fail cert check on some OSX machines
17+
// this overrides that check
18+
return 1;
19+
}
1820
}
1921
}
2022
})

examples/pull.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ nodegit.Repository.open(path.resolve(__dirname, repoDir))
1111
repository = repo;
1212

1313
return repository.fetchAll({
14-
credentials: function(url, userName) {
15-
return nodegit.Cred.sshKeyFromAgent(userName);
16-
},
17-
certificateCheck: function() {
18-
return 1;
14+
callbacks: {
15+
credentials: function(url, userName) {
16+
return nodegit.Cred.sshKeyFromAgent(userName);
17+
},
18+
certificateCheck: function() {
19+
return 1;
20+
}
1921
}
2022
});
2123
})

0 commit comments

Comments
 (0)