File tree 3 files changed +8
-35
lines changed 3 files changed +8
-35
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,25 @@ module.exports = class Repo {
14
14
15
15
const blobStores = initializeBlobStores ( options . stores )
16
16
17
- const setup = ( name , needsLocks , needsConfig ) => {
17
+ const setup = ( name , needs ) => {
18
+ needs = needs || { }
18
19
const args = [ repoPath , blobStores [ name ] ]
19
- if ( needsLocks ) {
20
+ if ( needs . locks ) {
20
21
args . push ( this . locks )
21
22
}
22
23
23
- if ( needsConfig ) {
24
+ if ( needs . config ) {
24
25
args . push ( this . config )
25
26
}
26
27
27
28
return stores [ name ] . setUp . apply ( stores [ name ] , args )
28
29
}
29
30
30
31
this . locks = setup ( 'locks' )
31
- this . version = setup ( 'version' , true )
32
- this . config = setup ( 'config' , true )
33
- this . keys = setup ( 'keys' , true , true )
34
- this . blockstore = setup ( 'blockstore' , true )
32
+ this . version = setup ( 'version' , { locks : true } )
33
+ this . config = setup ( 'config' , { locks : true } )
34
+ this . keys = setup ( 'keys' , { locks : true , config : true } )
35
+ this . blockstore = setup ( 'blockstore' , { locks : true } )
35
36
}
36
37
37
38
exists ( callback ) {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,5 +7,3 @@ exports.version = require('./version')
7
7
exports . config = require ( './config' )
8
8
exports . keys = require ( './keys' )
9
9
exports . blockstore = require ( './blockstore' )
10
- // exports.datastore = require('./datastore')
11
- // exports.logs = require('./logs')
You can’t perform that action at this time.
0 commit comments