MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / read

Method read

src/models/GitPackIndex.js:266–277  ·  view source on GitHub ↗
({ oid })

Source from the content-addressed store, hash-verified

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]) {

Callers 1

readSliceMethod · 0.95

Calls 2

readSliceMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected