move git fetch before getting origin_branch_name
This commit is contained in:
parent
0e14dd8d3a
commit
9e05995299
@ -590,14 +590,15 @@ class Tap
|
|||||||
end
|
end
|
||||||
return unless remote
|
return unless remote
|
||||||
|
|
||||||
current_upstream_head = T.must(git_repository.origin_branch_name)
|
|
||||||
return if requested_remote.blank? && git_repository.origin_has_branch?(current_upstream_head)
|
|
||||||
|
|
||||||
args = %w[fetch]
|
args = %w[fetch]
|
||||||
args << "--quiet" if quiet
|
args << "--quiet" if quiet
|
||||||
args << "origin"
|
args << "origin"
|
||||||
args << "+refs/heads/*:refs/remotes/origin/*"
|
args << "+refs/heads/*:refs/remotes/origin/*"
|
||||||
safe_system "git", "-C", path, *args
|
safe_system "git", "-C", path, *args
|
||||||
|
|
||||||
|
current_upstream_head = T.must(git_repository.origin_branch_name)
|
||||||
|
return if requested_remote.blank? && git_repository.origin_has_branch?(current_upstream_head)
|
||||||
|
|
||||||
git_repository.set_head_origin_auto
|
git_repository.set_head_origin_auto
|
||||||
|
|
||||||
new_upstream_head = T.must(git_repository.origin_branch_name)
|
new_upstream_head = T.must(git_repository.origin_branch_name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user