From 591e9d6a52559c8d0e95140bd08c0666f9535705 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 14 Jan 2021 10:47:44 +0000 Subject: [PATCH] dev-cmd/tap-new: fix output on newer versions of Git. Otherwise this prints to `stderr` to ask for configuration of the branch name: https://github.com/Homebrew/brew/pull/10323/checks?check_run_id=1701105141#step:5:51 --- Library/Homebrew/dev-cmd/tap-new.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index fb63340591..0ce16a62c8 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -148,7 +148,9 @@ module Homebrew unless args.no_git? cd tap.path do - safe_system "git", "init" + # Would be nice to use --initial-branch here but it's not available in + # older versions of Git that we support. + safe_system "git", "-c", "init.defaultBranch=#{branch}", "init" safe_system "git", "add", "--all" safe_system "git", "commit", "-m", "Create #{tap} tap" safe_system "git", "branch", "-m", branch