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_url = nil
 | 
			
		||||
 | 
			
		||||
      fv.rev_list("origin/master") do |rev|
 | 
			
		||||
      fv.rev_list("origin/HEAD") do |rev|
 | 
			
		||||
        begin
 | 
			
		||||
          fv.formula_at_revision(rev) do |f|
 | 
			
		||||
            stable = f.stable
 | 
			
		||||
 | 
			
		||||
@ -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"
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user