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

Method save

src/managers/GitConfigManager.js:33–39  ·  view source on GitHub ↗

* 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 })

Source from the content-addressed store, hash-verified

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}

Callers 6

_checkoutFunction · 0.80
_deleteBranchFunction · 0.80
_addRemoteFunction · 0.80
_deleteRemoteFunction · 0.80
_cloneFunction · 0.80
setConfigFunction · 0.80

Calls 2

writeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected