class Gem::Source::Git

def rev_parse # :nodoc:

:nodoc:
def rev_parse # :nodoc:
  hash = nil
  Dir.chdir repo_cache_dir do
    hash = Gem::Util.popen(@git, 'rev-parse', @reference).strip
  end
  raise Gem::Exception,
        "unable to find reference #{@reference} in #{@repository}" unless
          $?.success?
  hash
end