test: improve hermetic git repository setup in helpers

This commit is contained in:
Matteo Cherubini 2026-06-25 17:36:48 +02:00
parent 79f0ef9ac6
commit e33f4653f1

View file

@ -88,16 +88,17 @@ EOF
git init -q
# Hermetic: ignore the user's global git config (signing, global hooks);
# otherwise commit.gpgsign or a global core.hooksPath makes git commit fail here.
git config commit.gpgsign false
git config core.hooksPath "${base}/nohooks"
git config user.email t@t
git config user.name tester
git add .
git commit -qm init
git config --local user.name "Framework Test"
git config --local user.email "test@genome.local"
git config --local commit.gpgsign false
git config --local core.hooksPath "${base}/nohooks"
git branch -M main
git remote add origin "${base}/origin.git"
git add .
git commit -q -m "chore: initial scaffold"
git push -q -u origin main
) >/dev/null
)
echo "${g}"
}