From 4165b0848c2007ba8d244434ac3a14851b5077d9 Mon Sep 17 00:00:00 2001 From: James Bence Date: Wed, 17 Sep 2014 15:19:38 -0700 Subject: Replace tab indentation with spaces --- lib/chef/provider/git.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/chef/provider/git.rb') 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={}) -- cgit v1.2.1