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

Function readObjectLoose

src/storage/readObjectLoose.js:1–8  ·  view source on GitHub ↗
({ fs, gitdir, oid })

Source from the content-addressed store, hash-verified

1export async function readObjectLoose({ fs, gitdir, oid }) {
2 const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`
3 const file = await fs.read(`${gitdir}/${source}`)
4 if (!file) {
5 return null
6 }
7 return { object: file, format: 'deflated', source }
8}

Callers 2

checkAndWriteBlobFunction · 0.90
_readObjectFunction · 0.90

Calls 2

sliceMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…