Corrected. The original version listed two failures. Test 3 was an artifact of the environment I triaged in and is retracted below; the setup failure is genuine.
Summary
t/t9005-workspace-commit-push.sh fails 1 of 7 where init.defaultBranch is unset and git defaults to master.
not ok 1 - setup: create upstream bare repository and working clone
# passed: 6 failed: 1
The failing assertion
mkdir upstream.git &&
(cd upstream.git && git init --bare) &&
git clone upstream.git work &&
(cd work &&
git config user.email "test@example.com" &&
git config user.name "Test User" &&
echo "v1" > app.txt &&
git add app.txt &&
git commit -m "initial" &&
git push origin main)
The clone's branch is master, so git push origin main fails and the setup step reports failure.
Suggested fix
Pin the branch at git init — -b main, or git symbolic-ref HEAD refs/heads/main for git older than 2.28.
Same class as #191 (fixed in #192), #193 and #194.
Retraction: test 3
I originally flagged not ok 3 - implicit commit creates workspace commit with transaction trailer alongside this, and speculated it might be a second defect in implicit translation.
It is not. It was the same environment artifact described in #194: the container exports GIT_CONFIG_*, which makes should_delegate_to_real_git (modules/bit/cmd/bit/main.mbt:1044) hand the command to the real git binary before workspace_translate_implicit_command can run. With those variables unset only the setup failure above remains.
Summary
t/t9005-workspace-commit-push.shfails 1 of 7 whereinit.defaultBranchis unset and git defaults tomaster.The failing assertion
The clone's branch is
master, sogit push origin mainfails and the setup step reports failure.Suggested fix
Pin the branch at
git init—-b main, orgit symbolic-ref HEAD refs/heads/mainfor git older than 2.28.Same class as #191 (fixed in #192), #193 and #194.
Retraction: test 3
I originally flagged
not ok 3 - implicit commit creates workspace commit with transaction traileralongside this, and speculated it might be a second defect in implicit translation.It is not. It was the same environment artifact described in #194: the container exports
GIT_CONFIG_*, which makesshould_delegate_to_real_git(modules/bit/cmd/bit/main.mbt:1044) hand the command to the real git binary beforeworkspace_translate_implicit_commandcan run. With those variables unset only the setup failure above remains.