summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorJohn Duarte <john.duarte@puppetlabs.com>2014-05-21 18:17:31 -0700
committerJohn Duarte <john.duarte@puppetlabs.com>2014-05-21 18:17:31 -0700
commit2f875839afe843bd8a9f320d553fb3a28a7420f8 (patch)
tree681e6f1b03ca99eed51ad2bec40b9a3b192ee48f /lib/puppet/provider/vcsrepo
parent9057fca3a6862e699c153f3607e57f2360552eb7 (diff)
parent0d9e938e92a25673c3712866e2d2108a255b67d5 (diff)
downloadpuppet-vcsrepo-2f875839afe843bd8a9f320d553fb3a28a7420f8.tar.gz
puppet-vcsrepo-2f875839afe843bd8a9f320d553fb3a28a7420f8.tar.bz2
Merge pull request #145 from hunner/fix_beaker_tests
Update specs and fix FM-1361
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 1bccfb6..5c878ed 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -10,16 +10,15 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth
def create
+ if @resource.value(:revision) and @resource.value(:ensure) == :bare
+ fail("Cannot set a revision (#{@resource.value(:revision)}) on a bare repository")
+ end
if !@resource.value(:source)
init_repository(@resource.value(:path))
else
clone_repository(@resource.value(:source), @resource.value(:path))
if @resource.value(:revision)
- if @resource.value(:ensure) == :bare
- notice "Ignoring revision for bare repository"
- else
- checkout
- end
+ checkout
end
if @resource.value(:ensure) != :bare
update_submodules