    # File lib/chef/provider/git.rb, line 58
          def action_sync
            assert_target_directory_valid!

            if existing_git_clone?
              current_rev = find_current_revision
              Chef::Log.debug "#{@new_resource} current revision: #{current_rev} target revision: #{target_revision}"
              unless current_revision_matches_target_revision?
                fetch_updates
                enable_submodules
                Chef::Log.info "#{@new_resource} updated to revision #{target_revision}"
                @new_resource.updated_by_last_action(true)
              end
              add_remotes
            else
              action_checkout
              @new_resource.updated_by_last_action(true)
            end
          end