From 619696a07963d03ea9f3442092d09a1b18afa6963b3c21b8ab3c1280db347c23 Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Thu, 10 Apr 2025 16:46:57 +0200 Subject: [PATCH] Use `main` as the default branch name --- obs-git-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obs-git-init b/obs-git-init index c3b7308..bc92b57 100755 --- a/obs-git-init +++ b/obs-git-init @@ -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"); -- 2.51.1