From c2a223e6ecf978530ffe2d25dfa8df2d45ccc822 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Tue, 19 Feb 2008 23:19:53 +0000 Subject: [PATCH] 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 --- CHANGELOG | 2 ++ lib/capistrano/recipes/deploy/scm/git.rb | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1dfb1b801..18869df40 100644 --- a/CHANGELOG +++ b/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] diff --git a/lib/capistrano/recipes/deploy/scm/git.rb b/lib/capistrano/recipes/deploy/scm/git.rb index 0f645e2fd..b323e4f64 100644 --- a/lib/capistrano/recipes/deploy/scm/git.rb +++ b/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]