(identity: GitIdentity)
| 199 | } |
| 200 | |
| 201 | private async acquireRepository(identity: GitIdentity): Promise<Lease<GitRepository>> { |
| 202 | return this.repositories.acquire(identity.gitCommonDir, async () => { |
| 203 | const repository = new GitRepository({ |
| 204 | gitCommonDir: identity.gitCommonDir, |
| 205 | objectStoreDir: identity.objectStoreDir, |
| 206 | exec: this.exec.withCwd(identity.topLevel), |
| 207 | watcher: this.watcher, |
| 208 | objectStoreMutex: this.mutex, |
| 209 | onError: this.onError, |
| 210 | }); |
| 211 | try { |
| 212 | await repository.ready(); |
| 213 | } catch (error) { |
| 214 | await repository.dispose(); |
| 215 | throw error; |
| 216 | } |
| 217 | return repository; |
| 218 | }); |
| 219 | } |
| 220 | |
| 221 | private async resolveIdentity(pathInsideRepo: string): Promise<GitIdentity> { |
| 222 | const cwd = path.resolve(pathInsideRepo); |
no test coverage detected