summaryrefslogtreecommitdiff
path: root/lib/chef/provider/git.rb
diff options
context:
space:
mode:
authorJordan Evans <jordane@osuosl.org>2014-07-25 12:34:40 -0700
committerJordan Evans <jordane@osuosl.org>2014-07-25 12:34:40 -0700
commit14b0fc9e9c26a3f74c6fc143c35e582b68337546 (patch)
tree7d27c8633145775a12d217345832de5e6dfbbf99 /lib/chef/provider/git.rb
parent2cc728f2dd85e11835d23d03f76e0e4c75ca2510 (diff)
downloadchef-14b0fc9e9c26a3f74c6fc143c35e582b68337546.tar.gz
use -B in case user wants to reset branch
Diffstat (limited to 'lib/chef/provider/git.rb')
-rw-r--r--lib/chef/provider/git.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 3999edc16a..bf66266c3d 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -156,7 +156,7 @@ class Chef
converge_by("checkout ref #{sha_ref} branch #{@new_resource.revision}") do
# checkout into a local branch rather than a detached HEAD
- shell_out!("git checkout -b #{@new_resource.checkout_branch} #{sha_ref}", run_options(:cwd => @new_resource.destination))
+ shell_out!("git checkout -B #{@new_resource.checkout_branch} #{sha_ref}", run_options(:cwd => @new_resource.destination))
Chef::Log.info "#{@new_resource} checked out branch: #{@new_resource.revision} onto: #{@new_resource.checkout_branch} reference: #{sha_ref}"
end
end