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

Method writeSymbolicRef

src/managers/GitRefManager.js:199–203  ·  view source on GitHub ↗

* Writes a symbolic ref to the file system. * * @param {Object} args * @param {FSClient} args.fs - A file system implementation. * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path * @param {string} args.ref - The ref to write. * @param {string}

({ fs, gitdir, ref, value })

Source from the content-addressed store, hash-verified

197 * @returns {Promise<void>}
198 */
199 static async writeSymbolicRef({ fs, gitdir, ref, value }) {
200 await acquireLock(ref, async () =>
201 fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\n`, 'utf8')
202 )
203 }
204
205 /**
206 * Deletes a single ref.

Callers 4

_checkoutFunction · 0.80
_branchFunction · 0.80
_renameBranchFunction · 0.80
writeRefFunction · 0.80

Calls 3

joinFunction · 0.90
acquireLockFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected