Use main as default branch name
#1
@@ -31,7 +31,7 @@ $workdir = shift @ARGV if @ARGV == 1;
|
||||
my $config_file = "$workdir/.git/config";
|
||||
if ( ! -e $config_file ) {
|
||||
print "No git tree found, initializing\n";
|
||||
system('git', 'init', '--object-format=sha256', '-b=main', $workdir) && die("ERROR: git initialization failed");
|
||||
system('git', 'init', '--object-format=sha256', '--initial-branch=main', $workdir) && die("ERROR: git initialization failed");
|
||||
}
|
||||
my $cfg = Config::IniFiles->new( -file => $config_file ) || die("ERROR: Reading of git configuration failed");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user