Commit dc00562fa25fbe69273f58b414fa35ddf4e44c12
Exists in
master
and in
4 other branches
Merge branch 'satellite_merge' of /home/git/repositories/gitlab/gitlabhq
Showing
1 changed file
with
1 additions
and
3 deletions
Show diff stats
lib/gitlab/satellite/merge_action.rb
@@ -146,10 +146,8 @@ module Gitlab | @@ -146,10 +146,8 @@ module Gitlab | ||
146 | repo.remote_fetch('source') | 146 | repo.remote_fetch('source') |
147 | repo.git.checkout(default_options({b: true}), merge_request.target_branch, "origin/#{merge_request.target_branch}") | 147 | repo.git.checkout(default_options({b: true}), merge_request.target_branch, "origin/#{merge_request.target_branch}") |
148 | else | 148 | else |
149 | - # We can't trust the input here being branch names, we can't always check it out because it could be a relative ref i.e. HEAD~3 | ||
150 | - # we could actually remove the if true, because it should never ever happen (as long as the satellite has been prepared) | ||
151 | repo.git.checkout(default_options, "#{merge_request.source_branch}") | 149 | repo.git.checkout(default_options, "#{merge_request.source_branch}") |
152 | - repo.git.checkout(default_options, "#{merge_request.target_branch}") | 150 | + repo.git.checkout(default_options({t: true}), "origin/#{merge_request.target_branch}") |
153 | end | 151 | end |
154 | rescue Grit::Git::CommandFailed => ex | 152 | rescue Grit::Git::CommandFailed => ex |
155 | handle_exception(ex) | 153 | handle_exception(ex) |