mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
remove T.must
to avoid full fetch
This commit is contained in:
parent
9e05995299
commit
24d9524bbd
@ -590,17 +590,18 @@ class Tap
|
|||||||
end
|
end
|
||||||
return unless remote
|
return unless remote
|
||||||
|
|
||||||
|
current_upstream_head = git_repository.origin_branch_name
|
||||||
|
return if current_upstream_head.present? && 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
|
||||||
|
|
||||||
|
current_upstream_head = git_repository.origin_branch_name if current_upstream_head.nil?
|
||||||
|
|
||||||
new_upstream_head = T.must(git_repository.origin_branch_name)
|
new_upstream_head = T.must(git_repository.origin_branch_name)
|
||||||
return if new_upstream_head == current_upstream_head
|
return if new_upstream_head == current_upstream_head
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user