* 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 })
| 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. |
no test coverage detected