Skip to content

Commit 09b1aa5

Browse files
committed
Fix clone for nodegit to check if options are null before assigning fetchOpts.
1 parent d917ead commit 09b1aa5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/clone.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ Clone.clone = function(url, local_path, options) {
3838
fetchOpts.callbacks =
3939
normalizeOptions(remoteCallbacks, NodeGit.RemoteCallbacks);
4040

41-
options.fetchOpts = fetchOpts;
42-
41+
if (options) {
42+
options.fetchOpts = fetchOpts;
43+
}
4344

4445
// This is required to clean up after the clone to avoid file locking
4546
// issues in Windows and potentially other issues we don't know about.

test/tests/clone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("Clone", function() {
2525
});
2626
});
2727

28-
it.skip("can clone with http", function() {
28+
it("can clone with http", function() {
2929
var test = this;
3030
var url = "http://git.tbranyen.com/smart/site-content";
3131

0 commit comments

Comments
 (0)