Load a batch of commits from the repository, using a given commitish object as the starting point
(commitish: string, skip: number)
| 214 | |
| 215 | /** Load a batch of commits from the repository, using a given commitish object as the starting point */ |
| 216 | public async loadCommitBatch(commitish: string, skip: number) { |
| 217 | if (this.requestsInFight.has(LoadingHistoryRequestKey)) { |
| 218 | return null |
| 219 | } |
| 220 | |
| 221 | const requestKey = `history/compare/${commitish}/skip/${skip}` |
| 222 | if (this.requestsInFight.has(requestKey)) { |
| 223 | return null |
| 224 | } |
| 225 | |
| 226 | this.requestsInFight.add(requestKey) |
| 227 | |
| 228 | const commits = await this.performFailableOperation(() => |
| 229 | getCommits(this.repository, commitish, CommitBatchSize, skip) |
| 230 | ) |
| 231 | |
| 232 | this.requestsInFight.delete(requestKey) |
| 233 | if (!commits) { |
| 234 | return null |
| 235 | } |
| 236 | |
| 237 | this.storeCommits(commits) |
| 238 | return commits.map(c => c.sha) |
| 239 | } |
| 240 | |
| 241 | public async refreshTags() { |
| 242 | const previousTags = this._localTags |
no test coverage detected