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

Method content

src/models/GitWalkerRepo.js:109–123  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

107 async stat(_entry) {}
108
109 async content(entry) {
110 if (entry._content === false) {
111 const map = await this.mapPromise
112 const { fs, cache, gitdir } = this
113 const obj = map.get(entry._fullpath)
114 const oid = obj.oid
115 const { type, object } = await readObject({ fs, cache, gitdir, oid })
116 if (type !== 'blob') {
117 entry._content = undefined
118 } else {
119 entry._content = new Uint8Array(object)
120 }
121 }
122 return entry._content
123 }
124
125 async oid(entry) {
126 if (entry._oid === false) {

Callers 1

contentMethod · 0.45

Calls 2

readObjectFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected