Skip to content

fix(branch): run check-ref-format in a workdir to fix flaky validation - #180

Open
dfaure-kdab wants to merge 1 commit into
narnaud:mainfrom
dfaure-kdab:wip/dfaure/flaky-test
Open

fix(branch): run check-ref-format in a workdir to fix flaky validation#180
dfaure-kdab wants to merge 1 commit into
narnaud:mainfrom
dfaure-kdab:wip/dfaure/flaky-test

Conversation

@dfaure-kdab

Copy link
Copy Markdown
Collaborator

branch_validate_name spawned 'git check-ref-format' without setting the
child's cwd, so it inherited the process-global cwd. Git reads cwd even
for --branch, so when a parallel test had pointed the process at a temp
dir that was later deleted, validating a valid name failed with exit 128
(flaky branch_invalid_name_fails). Pass the caller's workdir through and
set current_dir, matching the other git wrappers.

branch_validate_name spawned 'git check-ref-format' without setting the
child's cwd, so it inherited the process-global cwd. Git reads cwd even
for --branch, so when a parallel test had pointed the process at a temp
dir that was later deleted, validating a valid name failed with exit 128
(flaky branch_invalid_name_fails). Pass the caller's workdir through and
set current_dir, matching the other git wrappers.
@dfaure-kdab
dfaure-kdab requested a review from narnaud as a code owner July 17, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant