Skip to content

Commit d94d65c

Browse files
committed
Updated for the latest API changes 0.5.0
See https://gitter.im/nodegit/nodegit?at=561c1b93773bc4af20ff1153
1 parent e1adf87 commit d94d65c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

examples/push.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,17 @@ fse.remove(path.resolve(__dirname, repoDir))
5151
.then(function(remoteResult) {
5252
remote = remoteResult;
5353

54-
remote.setCallbacks({
55-
credentials: function(url, userName) {
56-
return nodegit.Cred.sshKeyFromAgent(userName);
57-
}
58-
});
59-
6054
// Create the push object for this remote
6155
return remote.push(
6256
["refs/heads/master:refs/heads/master"],
63-
null,
64-
repository.defaultSignature(),
65-
"Push to master");
57+
{
58+
callbacks: {
59+
credentials: function(url, userName) {
60+
return nodegit.Cred.sshKeyFromAgent(userName);
61+
}
62+
}
63+
}
64+
);
6665
});
6766
}).done(function() {
6867
console.log("Done!");

0 commit comments

Comments
 (0)