forked from creationix/js-git
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs-git.js
More file actions
34 lines (23 loc) · 864 Bytes
/
Copy pathjs-git.js
File metadata and controls
34 lines (23 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module.exports = newRepo;
function newRepo(db) {
if (!db) throw new TypeError("A db interface instance is required");
// Create a new repo object.
var repo = {};
// Auto trace the db if tracing is turned on.
if (require('./lib/trace.js')) db = require('./lib/tracedb.js')(db);
// Add the db interface (used by objects, refs, and packops mixins)
repo.db = db;
// Mix in object store interface
require('./mixins/objects.js')(repo);
// Mix in the references interface
require('./mixins/refs.js')(repo);
// Mix in the walker helpers
require('./mixins/walkers.js')(repo);
// Mix in packfile import and export ability
require('./mixins/packops.js')(repo);
// Mix in git network client ability
require('./mixins/client.js')(repo);
// Mix in git network client ability
require('./mixins/server.js')(repo);
return repo;
}