async function setConfig({
  fs: _fs,
  dir,
  gitdir = join(dir, '.git'),
  path,
  value,
  append = false,
}) {
  try {
    assertParameter('fs', _fs)
    assertParameter('gitdir', gitdir)
    assertParameter('path', path)
    // assertParameter('value', value) // We actually allow 'undefined' as a value to unset/delete

    const fs = new FileSystem(_fs)
    const config = await GitConfigManager.get({ fs, gitdir })
    if (append) {
      await config.append(path, value)
    } else {
      await config.set(path, value)
    }
    await GitConfigManager.save({ fs, gitdir, config })
  } catch (err) {
    err.caller = 'git.setConfig'
    throw err
  }
}
Write an entry to the git config files.

*Caveats:*
- Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future.
- The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`.

@param {Object} args
@param {FsClient} args.fs - a file system implementation
@param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
@param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
@param {string} args.path - The key of the git config entry
@param {string | boolean | number | void} args.value - A value to store at that path. (Use `undefined` as the value to delete a config entry.)
@param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options).

@returns {Promise<void>} Resolves successfully when operation completed

@example
// Write config value
await git.setConfig({
  fs,
  dir: '/tutorial',
  path: 'user.name',
  value: 'Mr. Test'
})

// Print out config file
let file = await fs.promises.readFile('/tutorial/.git/config', 'utf8')
console.log(file)

// Delete a config entry
await git.setConfig({
  fs,
  dir: '/tutorial',
  path: 'user.name',
  value: undefined
})

// Print out config file
file = await fs.promises.readFile('/tutorial/.git/config', 'utf8')
console.log(file)