Skip to content

Commit

Permalink
Merge pull request #7070 from dawidd6/pull-on-linux
Browse files Browse the repository at this point in the history
pull: use `homebrew` remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX
  • Loading branch information
MikeMcQuaid committed Feb 24, 2020
2 parents 09f2ef8 + 5974714 commit 670227b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Library/Homebrew/dev-cmd/pull.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ def merge_commit?(url)
pr_number = url[%r{/pull\/([0-9]+)}, 1]
return false unless pr_number

safe_system "git", "fetch", "--quiet", "origin", "pull/#{pr_number}/head"
# Use `homebrew` remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX env variable is set.
# The `homebrew` remote points to homebrew-core tap and is used by Linux maintainers.
# See https://docs.brew.sh/Homebrew-linuxbrew-core-Maintainer-Guide#preparation
remote = ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] ? "homebrew" : "origin"
safe_system "git", "fetch", "--quiet", remote, "pull/#{pr_number}/head"
Utils.popen_read("git", "rev-list", "--parents", "-n1", "FETCH_HEAD").count(" ") > 1
end

Expand Down

0 comments on commit 670227b

Please sign in to comment.