Skip to content

Commit 665ba03

Browse files
committed
Auto merge of #4552 - teozkr:chore/local-index-branch, r=Turbo87
Explicitly specify the branch name in init-local-index.sh Otherwise the script breaks if `init.defaultBranch` is not set to `master` (with `main` becoming a common alternative these days). Split out from #4548.
2 parents dfdc817 + afcd34f commit 665ba03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script/init-local-index.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ mkdir -p tmp
1111
rm -rf tmp/index-bare tmp/index-tmp
1212

1313
echo "Initializing repository in tmp/index-bare..."
14-
git init -q --bare tmp/index-bare
14+
git init -q --bare --initial-branch=master tmp/index-bare
1515

1616
echo "Creating temporary clone in tmp/index-tmp..."
17-
git init -q tmp/index-tmp
17+
git init -q --initial-branch=master tmp/index-tmp
1818
cd tmp/index-tmp
1919
cat > config.json <<-EOF
2020
{

0 commit comments

Comments
 (0)