diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index c7a4bba552..c3aef27000 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -45,7 +45,7 @@ describe "brew install" do repo_path.join("bin").mkpath 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" FileUtils.touch "bin/something.bin" FileUtils.touch "README" diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index f05566a10e..56031ac601 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -927,7 +927,7 @@ module Homebrew tap_path.cd do system "git", "fetch" - system "git", "reset", "--hard", "origin/master" + system "git", "reset", "--hard", "origin/HEAD" end end diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index 476cd816da..6c4f5510fc 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -80,7 +80,7 @@ describe "brew bottle" do it "adds the bottle block to a formula that has none" do core_tap.path.cd do - system "git", "init" + system "git", "-c", "init.defaultBranch=master", "init" setup_test_formula "testball" system "git", "add", "--all" 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 core_tap.path.cd do - system "git", "init" + system "git", "-c", "init.defaultBranch=master", "init" setup_test_formula "testball", bottle_block: <<~EOS 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 core_tap.path.cd do - system "git", "init" + system "git", "-c", "init.defaultBranch=master", "init" setup_test_formula "testball", bottle_block: <<~EOS bottle do diff --git a/Library/Homebrew/test/download_strategies/git_spec.rb b/Library/Homebrew/test/download_strategies/git_spec.rb index a9d8e6215b..eb7010669a 100644 --- a/Library/Homebrew/test/download_strategies/git_spec.rb +++ b/Library/Homebrew/test/download_strategies/git_spec.rb @@ -23,7 +23,7 @@ describe GitDownloadStrategy do end 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" FileUtils.touch "README" git_commit_all diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb index 6aeb223eff..6c8a74c93c 100644 --- a/Library/Homebrew/test/formula_spec.rb +++ b/Library/Homebrew/test/formula_spec.rb @@ -1480,7 +1480,7 @@ describe Formula do testball_repo.cd do FileUtils.touch "LICENSE" - system("git", "init") + system("git", "-c", "init.defaultBranch=master", "init") system("git", "add", "--all") system("git", "commit", "-m", "Initial commit") end