class Git::Commands::ConfigOptionSyntax::Add
Append a value to a multi-valued config key
Wraps ‘git config –add` to add a new line to a config key without altering existing values.
@example Add a value to a multi-valued key
cmd = Git::Commands::ConfigOptionSyntax::Add.new(lib) cmd.call('remote.origin.fetch', '+refs/heads/*:refs/remotes/origin/*')
@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
Public Instance Methods
Source
# File lib/git/commands/config_option_syntax/add.rb, line 80 def call(*, **) super end
@overload call(name, value, **options)
Execute the `git config --add` command @param name [String] the config key name @param value [String] the value to append @param options [Hash] command options @option options [Boolean, nil] :global (nil) write to global config (`~/.gitconfig`) @option options [Boolean, nil] :system (nil) write to system config @option options [Boolean, nil] :local (nil) write to repository config (`.git/config`) @option options [Boolean, nil] :worktree (nil) write to worktree config @option options [String] :file (nil) write to the specified file Alias: :f @option options [String] :blob (nil) read from the specified blob @option options [String] :type (nil) ensure the value conforms to the given type @return [Git::CommandLine::Result] the result of calling `git config --add` @raise [ArgumentError] if unsupported options are provided @raise [Git::FailedError] if git exits with a non-zero exit status @api public
Calls superclass method
Git::Commands::Base::call