Skip to content

Commit 8bdcf46

Browse files
committed
test: ensure master branch exists in setup execution test
The test passes --base-branch master but init_test_git_repo creates the default branch from git config (often main). Create an explicit master branch so the test environment matches the expected input.
1 parent 27591cf commit 8bdcf46

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/test-unified-codex-config.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ else
482482
setup_test_dir
483483
EXEC_PROJECT="$TEST_DIR/exec-project"
484484
init_test_git_repo "$EXEC_PROJECT"
485+
# Ensure a 'master' branch exists so --base-branch master is valid
486+
# (init_test_git_repo may create 'main' depending on git config)
487+
(cd "$EXEC_PROJECT" && git branch master 2>/dev/null || true)
485488

486489
# Create project config with codex overrides
487490
mkdir -p "$EXEC_PROJECT/.humanize"

0 commit comments

Comments
 (0)