summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 1ca1751..58330f6 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -239,9 +239,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
# git < 1.6 returns '#{@resource.value(:remote)}/#{revision}'
# git 1.6+ returns 'remotes/#{@resource.value(:remote)}/#{revision}'
branch = at_path { branches.grep /(remotes\/)?#{@resource.value(:remote)}\/#{revision}/ }
- if branch.length > 0
- return branch
- end
+ branch unless branch.empty?
end
def local_branch_revision?(revision = @resource.value(:revision))