Skip to content

Select dirty tests with quoted Git paths - #2042

Merged
MrPunyapal merged 5 commits into
pestphp:5.xfrom
haranishi:fix/dirty-path-selection
Nov 19, 2026
Merged

MrPunyapal merged 5 commits into
pestphp:5.xfrom
haranishi:fix/dirty-path-selection

Conversation

@haranishi

@haranishi haranishi commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Bug Fix
  • New Feature

Description

--dirty misses test paths that Git quotes in its human-readable status output. It also selects a missing test when a staged modification precedes its deletion in the working tree.

Read Git's NUL-delimited porcelain output and strip only the repository prefix reported by Git. Disable rename pairing for this query so its destination can be selected separately. Drop candidate paths that no longer point to a file, including paths that still have staged or conflicted index entries.

The CLI regressions use real Git repositories at the repository root and in nested projects. They cover spaces, Unicode, renames, and deletions. The staged-modification case verifies that strict empty-suite handling matches an ordinary deletion in both serial and parallel runs. A merge conflict fixture verifies that an existing test still runs and that removing it yields an empty selection.

composer test passed. The targeted tests and regenerated output snapshot also passed with the other pending Pest fixes applied together.

@MrPunyapal
MrPunyapal merged commit a07f68b into pestphp:5.x Nov 19, 2026
@MrPunyapal

Copy link
Copy Markdown
Member

Thanks!

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.

2 participants