summaryrefslogtreecommitdiff
path: root/tool/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-28 18:29:18 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-28 18:29:31 +0900
commit35da0d4a6edb06ef541546e1fb58f72d4c20cdad (patch)
tree8e470b7faf53c6b4c033e05f43c1a96f3880abbb /tool/test
parent9b07d30df8c6bf65c2558c023fd6452405915610 (diff)
Support older git
The -b flag is available since 2.28, but Ubuntu 20.04 uses 2.25.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7770
Diffstat (limited to 'tool/test')
-rwxr-xr-xtool/test/test_sync_default_gems.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/test/test_sync_default_gems.rb b/tool/test/test_sync_default_gems.rb
index c49763572f..8e667fc4d2 100755
--- a/tool/test/test_sync_default_gems.rb
+++ b/tool/test/test_sync_default_gems.rb
@@ -84,13 +84,14 @@ module Test_SyncDefaultGems
ENV["GIT_CONFIG_GLOBAL"] = @testdir + "/gitconfig"
system(*%W"git config --global user.email test@ruby-lang.org")
system(*%W"git config --global user.name", "Ruby")
+ system(*%W"git config --global init.defaultBranch default")
@target = "sync-test"
SyncDefaultGems::REPOSITORIES[@target.to_sym] = ["ruby/#{@target}", "default"]
@sha = {}
@origdir = Dir.pwd
Dir.chdir(@testdir)
["src", @target].each do |dir|
- system(*%W"git init -q -b default #{dir}", exception: true)
+ system(*%W"git init -q #{dir}", exception: true)
Dir.mkdir("#{dir}/tool")
File.write("#{dir}/tool/ok", "#!/bin/sh\n""echo ok\n")
system(*%W"git add tool/ok", exception: true, chdir: dir)