({ oid })
| 264 | } |
| 265 | |
| 266 | async read({ oid }) { |
| 267 | if (!this.offsets.get(oid)) { |
| 268 | if (this.getExternalRefDelta) { |
| 269 | this.externalReadDepth++ |
| 270 | return this.getExternalRefDelta(oid) |
| 271 | } else { |
| 272 | throw new InternalError(`Could not read object ${oid} from packfile`) |
| 273 | } |
| 274 | } |
| 275 | const start = this.offsets.get(oid) |
| 276 | return this.readSlice({ start }) |
| 277 | } |
| 278 | |
| 279 | async readSlice({ start }) { |
| 280 | if (this.offsetCache[start]) { |