Method: Pkg::Util::Git_tag#parse_ref!

Defined in:
lib/packaging/util/git_tags.rb

#parse_ref!Object

Parse ref in one of three ways: if the ref is already in a good format just grab the ref type from the string. if it’s not, check if it’s a sha, if that is true then list it as a sha. finally if it’s neither of those fetch the full ref and parse that.



23
24
25
26
27
28
29
30
31
# File 'lib/packaging/util/git_tags.rb', line 23

def parse_ref!
  if ref?
    split_ref(ref)
  elsif sha?
    @ref_type = "sha"
  else
    split_ref(fetch_full_ref)
  end
end