class Git::Commands::ConfigOptionSyntax::Set

Set a config value

Wraps the implicit ‘git config <name> <value>` set mode to assign a value to a config key, optionally replacing only the entry matching a value regex.

@example Set a local config value

cmd = Git::Commands::ConfigOptionSyntax::Set.new(lib)
cmd.call('user.name', 'Alice')

@example Set a global config value

cmd = Git::Commands::ConfigOptionSyntax::Set.new(lib)
cmd.call('user.name', 'Alice', global: true)

@example Set a value with a type constraint

cmd = Git::Commands::ConfigOptionSyntax::Set.new(lib)
cmd.call('core.bare', 'true', type: 'bool')

@note ‘arguments` block audited against git-scm.com/docs/git-config/2.53.0

@see Git::Commands::ConfigOptionSyntax

@see git-scm.com/docs/git-config git-config documentation

@api private