Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10918: git.rb.patch

File git.rb.patch, 0.9 kB (added by nuttycom, 9 months ago)

Patch to use git checkout instead of branch & merge

  • a/lib/capistrano/recipes/deploy/scm/git.rb

    old new  
    117117            execute  = "#{git} clone #{configuration[:repository]} #{destination} && " 
    118118          end 
    119119 
    120           execute += "cd #{destination} && #{git} checkout -b deploy #{branch}"  
     120          execute += "cd #{destination} && #{git} checkout #{branch}"  
    121121 
    122122          execute 
    123123        end 
     
    128128          execute = "cd #{destination} && git fetch origin && " 
    129129 
    130130          if head == 'HEAD' 
    131             execute += "git merge origin/HEAD" 
     131            execute += "git checkout origin/HEAD" 
    132132          else 
    133             execute += "git merge #{head}" 
     133            execute += "git checkout #{head}" 
    134134          end 
    135135 
    136136          execute