summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-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 61044e0..f6ee407 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -9,16 +9,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