Ticket #10515: 0001-Bugfix-Git-scm-sync-method-ignored-value-of-scm.patch
| File 0001-Bugfix-Git-scm-sync-method-ignored-value-of-scm.patch, 2.4 kB (added by grempe, 9 months ago) |
|---|
-
a/lib/capistrano/recipes/deploy/scm/git.rb
old new 125 125 # Merges the changes to 'head' since the last fetch, for remote_cache 126 126 # deployment strategy 127 127 def sync(revision, destination) 128 execute = "cd #{destination} && git fetch origin && " 128 git = command 129 130 execute = "cd #{destination} && #{git} fetch origin && " 129 131 130 132 if head == 'HEAD' 131 execute += " gitmerge origin/HEAD"133 execute += "#{git} merge origin/HEAD" 132 134 else 133 execute += " gitmerge #{head}"135 execute += "#{git} merge #{head}" 134 136 end 135 137 136 138 execute -
a/test/deploy/scm/git_test.rb
old new 56 56 # With branch 57 57 @config[:branch] = "origin/foo" 58 58 assert_equal "cd #{dest} && git fetch origin && git merge origin/foo", @source.sync('Not used', dest) 59 60 # With :scm_command 61 @config[:scm_command] = "/opt/local/bin/git" 62 assert_equal "cd #{dest} && /opt/local/bin/git fetch origin && /opt/local/bin/git merge origin/foo", @source.sync('Not used', dest) 59 63 end 60 64 61 65 def test_shallow_clone