Merge pull request #13979 from Bo98/default-branch
Support non-master init.defaultbranch
This commit is contained in:
commit
2e4fd69e14
@ -731,7 +731,7 @@ module Homebrew
|
|||||||
newest_committed_revision = nil
|
newest_committed_revision = nil
|
||||||
newest_committed_url = nil
|
newest_committed_url = nil
|
||||||
|
|
||||||
fv.rev_list("origin/master") do |rev|
|
fv.rev_list("origin/HEAD") do |rev|
|
||||||
begin
|
begin
|
||||||
fv.formula_at_revision(rev) do |f|
|
fv.formula_at_revision(rev) do |f|
|
||||||
stable = f.stable
|
stable = f.stable
|
||||||
|
|||||||
@ -45,7 +45,7 @@ describe "brew install" do
|
|||||||
repo_path.join("bin").mkpath
|
repo_path.join("bin").mkpath
|
||||||
|
|
||||||
repo_path.cd do
|
repo_path.cd do
|
||||||
system "git", "init"
|
system "git", "-c", "init.defaultBranch=master", "init"
|
||||||
system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
|
system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
|
||||||
FileUtils.touch "bin/something.bin"
|
FileUtils.touch "bin/something.bin"
|
||||||
FileUtils.touch "README"
|
FileUtils.touch "README"
|
||||||
|
|||||||
@ -927,7 +927,7 @@ module Homebrew
|
|||||||
|
|
||||||
tap_path.cd do
|
tap_path.cd do
|
||||||
system "git", "fetch"
|
system "git", "fetch"
|
||||||
system "git", "reset", "--hard", "origin/master"
|
system "git", "reset", "--hard", "origin/HEAD"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ describe "brew bottle" do
|
|||||||
|
|
||||||
it "adds the bottle block to a formula that has none" do
|
it "adds the bottle block to a formula that has none" do
|
||||||
core_tap.path.cd do
|
core_tap.path.cd do
|
||||||
system "git", "init"
|
system "git", "-c", "init.defaultBranch=master", "init"
|
||||||
setup_test_formula "testball"
|
setup_test_formula "testball"
|
||||||
system "git", "add", "--all"
|
system "git", "add", "--all"
|
||||||
system "git", "commit", "-m", "testball 0.1"
|
system "git", "commit", "-m", "testball 0.1"
|
||||||
@ -140,7 +140,7 @@ describe "brew bottle" do
|
|||||||
|
|
||||||
it "replaces the bottle block in a formula that already has a bottle block" do
|
it "replaces the bottle block in a formula that already has a bottle block" do
|
||||||
core_tap.path.cd do
|
core_tap.path.cd do
|
||||||
system "git", "init"
|
system "git", "-c", "init.defaultBranch=master", "init"
|
||||||
setup_test_formula "testball", bottle_block: <<~EOS
|
setup_test_formula "testball", bottle_block: <<~EOS
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
@ -207,7 +207,7 @@ describe "brew bottle" do
|
|||||||
|
|
||||||
it "updates the bottle block in a formula that already has a bottle block when using --keep-old" do
|
it "updates the bottle block in a formula that already has a bottle block when using --keep-old" do
|
||||||
core_tap.path.cd do
|
core_tap.path.cd do
|
||||||
system "git", "init"
|
system "git", "-c", "init.defaultBranch=master", "init"
|
||||||
setup_test_formula "testball", bottle_block: <<~EOS
|
setup_test_formula "testball", bottle_block: <<~EOS
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
|
|||||||
@ -23,7 +23,7 @@ describe GitDownloadStrategy do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def setup_git_repo
|
def setup_git_repo
|
||||||
system "git", "init"
|
system "git", "-c", "init.defaultBranch=master", "init"
|
||||||
system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
|
system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
|
||||||
FileUtils.touch "README"
|
FileUtils.touch "README"
|
||||||
git_commit_all
|
git_commit_all
|
||||||
|
|||||||
@ -1480,7 +1480,7 @@ describe Formula do
|
|||||||
testball_repo.cd do
|
testball_repo.cd do
|
||||||
FileUtils.touch "LICENSE"
|
FileUtils.touch "LICENSE"
|
||||||
|
|
||||||
system("git", "init")
|
system("git", "-c", "init.defaultBranch=master", "init")
|
||||||
system("git", "add", "--all")
|
system("git", "add", "--all")
|
||||||
system("git", "commit", "-m", "Initial commit")
|
system("git", "commit", "-m", "Initial commit")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user