Merge pull request #10324 from MikeMcQuaid/tap-new-branch

dev-cmd/tap-new: fix output on newer versions of Git.
This commit is contained in:
Mike McQuaid 2021-01-14 11:50:05 +00:00 committed by GitHub
commit 5dd47609f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,9 @@ module Homebrew
unless args.no_git? unless args.no_git?
cd tap.path do 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", "add", "--all"
safe_system "git", "commit", "-m", "Create #{tap} tap" safe_system "git", "commit", "-m", "Create #{tap} tap"
safe_system "git", "branch", "-m", branch safe_system "git", "branch", "-m", branch