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

Method get

src/models/GitConfig.js:180–189  ·  view source on GitHub ↗
(path, getall = false)

Source from the content-addressed store, hash-verified

178 }
179
180 async get(path, getall = false) {
181 const normalizedPath = normalizePath(path).path
182 const allValues = this.parsedConfig
183 .filter(config => config.path === normalizedPath)
184 .map(({ section, name, value }) => {
185 const fn = schema[section] && schema[section][name]
186 return fn ? fn(value) : value
187 })
188 return getall ? allValues : allValues.pop()
189 }
190
191 async getall(path) {
192 return this.get(path, true)

Callers 15

getallMethod · 0.95
readdirMethod · 0.45
typeMethod · 0.45
modeMethod · 0.45
contentMethod · 0.45
oidMethod · 0.45
toBufferMethod · 0.45
readMethod · 0.45
_addEntryMethod · 0.45
readdirMethod · 0.45
statMethod · 0.45
oidMethod · 0.45

Calls 1

normalizePathFunction · 0.85

Tested by

no test coverage detected