Skip to content

Commit 5459e38

Browse files
committed
Normalize the remote callbacks
1 parent a70dad9 commit 5459e38

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

generate/descriptor.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
"../include/checkout_options.h",
167167
"../include/remote_callbacks.h"
168168
],
169+
169170
"fields": [{
170171
"name": "version",
171172
"cType": "int"

lib/clone.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ var clone = Clone.clone;
1313
*/
1414
Clone.clone = function(url, local_path, options) {
1515
options = normalizeOptions(options, NodeGit.CloneOptions);
16+
options.remoteCallbacks = normalizeOptions(options.remoteCallbacks,
17+
NodeGit.RemoteCallbacks);
18+
1619
return clone.call(this, url, local_path, options);
1720
};
1821

test/tests/clone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe("Clone", function() {
4646
var url = "git@github.com:nodegit/test.git";
4747
var opts = {
4848
ignoreCertErrors: 1,
49-
remote_callbacks: {
49+
remoteCallbacks: {
5050
credentials: function() {
5151
console.log("here");
5252
return null;

0 commit comments

Comments
 (0)