Skip to content

Commit ba081a7

Browse files
committed
pull shallow clone off utils object
Instead of requiring it, pull it of NodeGit.Utils the same way we do with other utils files. Follows the spirit of the last commit, in that it gets rid of requiring individual modules.
1 parent de14353 commit ba081a7

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

lib/cherrypick.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var NodeGit = require("../");
2-
var shallowClone = require("./utils/shallow_clone");
2+
var shallowClone = NodeGit.Utils.shallowClone;
33
var normalizeOptions = NodeGit.Utils.normalizeOptions;
44

55
var Cherrypick = NodeGit.Cherrypick;

lib/clone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var NodeGit = require("../");
2-
var shallowClone = require("./utils/shallow_clone");
2+
var shallowClone = NodeGit.Utils.shallowClone;
33
var normalizeOptions = NodeGit.Utils.normalizeOptions;
44

55
var Clone = NodeGit.Clone;

lib/rebase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var NodeGit = require("../");
22
var Rebase = NodeGit.Rebase;
33
var normalizeOptions = NodeGit.Utils.normalizeOptions;
4-
var shallowClone = require("./utils/shallow_clone");
4+
var shallowClone = NodeGit.Utils.shallowClone;
55

66
/**
77
* Initializes a rebase

lib/remote.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var NodeGit = require("../");
22
var normalizeOptions = NodeGit.Utils.normalizeOptions;
33
var lookupWrapper = NodeGit.Utils.lookupWrapper;
4-
var shallowClone = require("./utils/shallow_clone");
4+
var shallowClone = NodeGit.Utils.shallowClone;
55

66
var Remote = NodeGit.Remote;
77
var connect = Remote.prototype.connect;

lib/stash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var NodeGit = require("../");
22
var normalizeOptions = NodeGit.Utils.normalizeOptions;
3-
var shallowClone = require("./utils/shallow_clone");
3+
var shallowClone = NodeGit.Utils.shallowClone;
44
var Stash = NodeGit.Stash;
55

66
var sApply = Stash.apply;

lib/utils/shallow_clone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ function shallowClone() {
1111
}, {});
1212
}
1313

14-
NodeGit.Utils.shallowClone = module.exports = shallowClone;
14+
NodeGit.Utils.shallowClone = shallowClone;

0 commit comments

Comments
 (0)