Module: GitDump::Repo::Git::ClassMethods

Defined in:
lib/git_dump/repo/git.rb

Overview

Methods which work outside of git repository

Instance Method Summary collapse

Instance Method Details

#remote_tag_names(url) ⇒ Object

List remote tag names



20
21
22
23
24
25
26
27
# File 'lib/git_dump/repo/git.rb', line 20

def remote_tag_names(url)
  Cmd.git('ls-remote', '--tags', url).stripped_lines.map do |line|
    m = %r!^[0-9a-f]{40}\trefs/tags/(.*)$!.match(line)
    fail "Unexpected: #{line}" unless m

    m[1]
  end
end