Skip to content

Commit de04c08

Browse files
committed
Introduced a new segfault woot
1 parent b2c19f7 commit de04c08

5 files changed

Lines changed: 24 additions & 6 deletions

File tree

generate/descriptor.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,9 @@
692692
"fields": [{
693693
"name": "version",
694694
"cType": "int"
695+
}, {
696+
"name": "credentials",
697+
"cType": "function"
695698
}]
696699
},
697700

lib/clone.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ var clone = Clone.clone;
1212
* @param options
1313
*/
1414
Clone.clone = function(url, local_path, options) {
15-
options = normalizeOptions(options, NodeGit.CloneOptions);
16-
return clone.call(this, url, local_path, options);
15+
//var opts = normalizeOptions(options, NodeGit.CloneOptions);
16+
//opts = normalizeOptions(options.remote_callbacks, NodeGit.RemoteCallbacks);
17+
18+
var callbacks = new NodeGit.RemoteCallbacks();
19+
console.log(callbacks);
20+
//return clone.call(this, url, local_path, opts);
1721
};
1822

1923
module.exports = Clone;

lib/nodegit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ var promisify = require("promisify-node");
22
var descriptors = require("../generate/idefs.json");
33
var rawApi;
44

5+
//require("segfault_handler").registerHandler();
6+
57
// Attempt to load the production release first, if it fails fall back to the
68
// debug release.
79
try {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@
7272
},
7373
"scripts": {
7474
"lint": "jshint lib test/tests",
75-
"mocha": "istanbul cover node_modules/mocha/bin/_mocha -- test/runner test/tests --report=lcov",
76-
"test": "npm run lint && npm run mocha",
75+
"cov": "istanbul cover node_modules/mocha/bin/_mocha -- test/runner test/tests --report=lcov",
76+
"mocha": "mocha test/runner test/tests",
77+
"test": "npm run lint && npm run cov",
7778
"publish": "node-pre-gyp package && node-pre-gyp publish",
7879
"generate": "node generate/setup && node generate",
7980
"install": "npm run generate && node install",

test/tests/clone.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,17 @@ describe("Clone", function() {
4242
});
4343
});
4444

45-
it("can clone with ssh", function() {
45+
it.only("can clone with ssh", function() {
4646
var url = "git@github.com:nodegit/test.git";
47-
var opts = { ignoreCertErrors: 1 };
47+
var opts = {
48+
ignoreCertErrors: 1,
49+
remote_callbacks: {
50+
credentials: function() {
51+
console.log("here");
52+
return null;
53+
}
54+
}
55+
};
4856

4957
return Clone.clone(url, ssh, opts).then(function(repository) {
5058
assert.ok(repository instanceof Repository);

0 commit comments

Comments
 (0)