Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,14 @@ def show(objectish=nil, path=nil)

def config_set(name, value)
command('config', [name, value])
rescue Git::GitExecuteError
command('config', ['--add', name, value])
end

def global_config_set(name, value)
command('config', ['--global', name, value], false)
rescue Git::GitExecuteError
command('config', ['--global', '--add', name, value], false)
end

# updates the repository index using the working directory content
Expand Down