Style adjustment
authorAaron Stone <aaron@serendipity.cx>
Fri, 19 Jul 2013 18:52:12 +0000 (11:52 -0700)
committerAaron Stone <aaron@serendipity.cx>
Sat, 20 Jul 2013 05:12:49 +0000 (22:12 -0700)
lib/puppet/provider/vcsrepo/git.rb

index 1ca1751..58330f6 100644 (file)
@@ -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))