Checkout tags properly.
Previously the tag checkout code would checkout a new branch for the tag using the current branch (master) as the base for the new branch. Instead use the actual tag as the base for the tag branch. Change-Id: Ic18bad7d19da3298b73f3e4185ca0bb5d4b3bf04 Reviewed-on: https://review.openstack.org/16030 Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
a442a28e68
commit
c038985e59
2
lib/puppet/provider/vcsrepo/git.rb
Normal file → Executable file
2
lib/puppet/provider/vcsrepo/git.rb
Normal file → Executable file
@ -195,7 +195,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
|
||||
def checkout(revision = @resource.value(:revision))
|
||||
if tag_revision?(revision)
|
||||
if !local_branch_revision?("tag/#{revision}")
|
||||
at_path { git_with_identity('checkout', '-b', "tag/#{revision}") }
|
||||
at_path { git_with_identity('checkout', '-b', "tag/#{revision}", "#{revision}") }
|
||||
else
|
||||
at_path { git_with_identity('checkout', '--force', "tag/#{revision}") }
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user