Skip to content

Commit

Permalink
use checkout instead of merge for git SCM (closes #10918)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@8901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Feb 19, 2008
1 parent 63f449b commit c2a223e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions 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]
Expand Down
6 changes: 3 additions & 3 deletions lib/capistrano/recipes/deploy/scm/git.rb
Expand Up @@ -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"
Expand All @@ -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]
Expand Down

0 comments on commit c2a223e

Please sign in to comment.