summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Valyi <rvalyi@gmail.com>2014-05-10 22:55:18 -0300
committerRaphaël Valyi <rvalyi@gmail.com>2014-05-10 22:55:18 -0300
commita9f7f503651e119b55bcecd57ae005282fbd3c0a (patch)
treec7e8730b1f5778ad8e70e722045739315542089b
parent34a2e6e8bae46e2b7eb83135d4d40318792ad85a (diff)
downloadchef-a9f7f503651e119b55bcecd57ae005282fbd3c0a.tar.gz
git resource status checking saves 1 shell_out system call
-rw-r--r--lib/chef/provider/git.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 46c8965c7d..3999edc16a 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -95,8 +95,7 @@ class Chef
def action_sync
if existing_git_clone?
- current_rev = find_current_revision
- Chef::Log.debug "#{@new_resource} current revision: #{current_rev} target revision: #{target_revision}"
+ Chef::Log.debug "#{@new_resource} current revision: #{@current_resource.revision} target revision: #{target_revision}"
unless current_revision_matches_target_revision?
fetch_updates
enable_submodules