Method: Grit::Repo#remote_info

Defined in:
lib/gx/enhance.rb

#remote_info(who, which = nil) ⇒ Object



130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/gx/enhance.rb', line 130

def remote_info(who, which=nil)
  if which
    hash, name = @git.ls_remote({:timeout => false}, who, which).split(/\s+/, 2)
    return hash
  else
    ret = {}
    @git.ls_remote({:timeout => false}, who).split("\n").each do |line|
      hash, name = line.split(/\s+/, 2)
      ret[name] = hash
    end
    return ret
  end
end