summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bence <jbence@mdsol.com>2014-09-17 15:19:38 -0700
committerJames Bence <jbence@mdsol.com>2014-09-17 15:19:38 -0700
commit4165b0848c2007ba8d244434ac3a14851b5077d9 (patch)
tree09e27c170a799c6a60b530bd7a4a9c11b7d43187
parentb271a2adb8a9c9e07f8e8d5c6b4240a093cff67b (diff)
downloadchef-4165b0848c2007ba8d244434ac3a14851b5077d9.tar.gz
Replace tab indentation with spaces
-rw-r--r--lib/chef/provider/git.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 02e3d23464..1e51398fa0 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -256,22 +256,22 @@ class Chef
else
found = refs.find_all { |m| m[1].end_with?(@new_resource.revision) }
end
- pick_shortest_ref(found)
+ pick_shortest_ref(found)
end
private
def pick_shortest_ref(refs=[])
- if refs.empty?
- nil
- else
- # refs is an Array of two-element Arrays: [SHA, TAG_NAME]: e.g,,
- # [['faceb423432...', 'refs/tags/2014.9.3'], ...]
- # Return the SHA of the shortest tag, since :find_all :end_with?
- # was used to build the list of refs.
- ref = refs.sort { |a, b| a[1].length <=> b[1].length }.first
- ref[0]
- end
+ if refs.empty?
+ nil
+ else
+ # refs is an Array of two-element Arrays: [SHA, TAG_NAME]: e.g,,
+ # [['faceb423432...', 'refs/tags/2014.9.3'], ...]
+ # Return the SHA of the shortest tag, since :find_all :end_with?
+ # was used to build the list of refs.
+ ref = refs.sort { |a, b| a[1].length <=> b[1].length }.first
+ ref[0]
+ end
end
def run_options(run_opts={})