diff options
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/lib.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 256d4b6..eb06875 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -295,9 +295,10 @@ module Git def config_remote(name) hsh = {} - command_lines('config', ['--get-regexp', "remote.#{name}"]).each do |line| - (key, value) = line.split - hsh[key.gsub("remote.#{name}.", '')] = value + config_list.each do |key, value| + if /remote.#{name}/.match(key) + hsh[key.gsub("remote.#{name}.", '')] = value + end end hsh end |