* Saves the provided Git configuration to the specified `.git` directory. * * @param {object} opts - Options for saving the Git configuration. * @param {FSClient} opts.fs - A file system implementation. * @param {string} opts.gitdir - The path to the `.git` directory. * @param {GitCon
({ fs, gitdir, config })
| 31 | * @returns {Promise<void>} Resolves when the configuration has been successfully saved. |
| 32 | */ |
| 33 | static async save({ fs, gitdir, config }) { |
| 34 | // We can improve efficiency later if needed. |
| 35 | // TODO: handle saving to the correct global/user/repo location |
| 36 | await fs.write(`${gitdir}/config`, config.toString(), { |
| 37 | encoding: 'utf8', |
| 38 | }) |
| 39 | } |
| 40 | } |
no test coverage detected