Support older git
The -b flag is available since 2.28, but Ubuntu 20.04 uses 2.25.
This commit is contained in:
parent
9b07d30df8
commit
35da0d4a6e
Notes:
git
2023-04-28 10:23:57 +00:00
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user