Method: Chef::Provider::Git#find_revision
- Defined in:
- lib/chef/provider/git.rb
#find_revision(refs, revision, suffix = "") ⇒ Object
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/chef/provider/git.rb', line 317 def find_revision(refs, revision, suffix = "") found = refs_search(refs, rev_match_pattern("refs/tags/", revision) + suffix) if !found.empty? @is_tag = true found else found = refs_search(refs, rev_match_pattern("refs/heads/", revision) + suffix) if !found.empty? @is_branch = true found else refs_search(refs, revision + suffix) end end end |