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

Method writeRef

src/managers/GitRefManager.js:179–187  ·  view source on GitHub ↗
({ fs, gitdir, ref, value })

Source from the content-addressed store, hash-verified

177 */
178 // TODO: make this less crude?
179 static async writeRef({ fs, gitdir, ref, value }) {
180 // Validate input
181 if (!value.match(/[0-9a-f]{40}/)) {
182 throw new InvalidOidError(value)
183 }
184 await acquireLock(ref, async () =>
185 fs.write(join(gitdir, ref), `${value.trim()}\n`, 'utf8')
186 )
187 }
188
189 /**
190 * Writes a symbolic ref to the file system.

Callers 14

_checkoutFunction · 0.80
_commitFunction · 0.80
_branchFunction · 0.80
_annotatedTagFunction · 0.80
_deleteBranchFunction · 0.80
_renameBranchFunction · 0.80
_mergeFunction · 0.80
_pushFunction · 0.80
writeStashRefMethod · 0.80
tagFunction · 0.80
writeRefFunction · 0.80

Calls 3

joinFunction · 0.90
acquireLockFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected