Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use checkout instead of merge for git SCM (closes #10918)

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@8901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit c2a223e6ecf978530ffe2d25dfa8df2d45ccc822 1 parent 63f449b
@jamis jamis authored
Showing with 5 additions and 3 deletions.
  1. +2 −0  CHANGELOG
  2. +3 −3 lib/capistrano/recipes/deploy/scm/git.rb
View
2  CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Use checkout instead of merge for git SCM [nuttycom]
+
* Fix typo in Subversion SCM module, encountered when an update fails [kemiller]
* Fix documentation typo in upload.rb [evolving_jerk]
View
6 lib/capistrano/recipes/deploy/scm/git.rb
@@ -119,7 +119,7 @@ def checkout(revision, destination)
end
execute << "cd #{destination}"
- execute << "#{git} checkout -b deploy #{branch}"
+ execute << "#{git} checkout #{branch}"
if configuration[:git_enable_submodules]
execute << "#{git} submodule init"
execute << "#{git} submodule update"
@@ -136,9 +136,9 @@ def sync(revision, destination)
execute << "cd #{destination} && #{git} fetch origin"
if head == 'HEAD'
- execute << "#{git} merge origin/HEAD"
+ execute << "#{git} checkout origin/HEAD"
else
- execute << "#{git} merge #{head}"
+ execute << "#{git} checkout #{head}"
end
if configuration[:git_enable_submodules]
Please sign in to comment.
Something went wrong with that request. Please try again.