restore pull request fetching

This commit is contained in:
Alexander Machehin 2013-06-18 08:11:20 +06:00
parent 37003f8f0c
commit 532fca43dd
1 changed files with 2 additions and 2 deletions

View File

@ -194,8 +194,8 @@ class PullRequest < ActiveRecord::Base
system 'git', 'reset', '--hard', "origin/#{to_ref}"
end
unless tags.include? from_ref
system 'git', 'checkout', from_branch
system 'git', 'reset', '--hard', "#{head}/#{from_ref}"
system 'git', 'branch', '-D', from_branch
system 'git', 'fetch', head, "+#{from_ref}:#{from_branch}"
system 'git', 'checkout', to_ref
end
end