# File lib/rhc/git_helpers.rb, line 95 def git_config_set(key, value) unset_cmd = "#{discover_git_executable} config --unset-all #{key}" config_cmd = "#{discover_git_executable} config --add #{key} #{value}" debug "Adding #{key} = #{value} to git config" commands = [unset_cmd, config_cmd] commands.each do |cmd| debug "Running #{cmd} 2>&1" output = %x[#{cmd} 2>&1] raise RHC::GitException, "Error while adding config values to git - #{output}" unless output.empty? end end