Repository navigation
Conversation
git status --porcelain emits worktree renames as " R new\0old". The parser only checked the first status column, so the paired source path was read as a standalone record and truncated by substr(3). The broken path then made git check-ignore exit 128, which surfaced as MissingDependency("Tia mode", "git").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Description:
pest --tiastops before it runs a test and printsMissingDependency: The [Tia mode] feature requires [git]. Please install it and try again.when the working tree contains a rename that git reports in the second status column.Plain git reproduction:
git status --porcelain -zthen printsR Q/File.php\0A/File.php. TheRsits in the second column.ChangedFiles::workingTreeChanges()only checks$status[0], so it skips the rename branch. It adds the destination path and reads the source path as its own record, andsubstr($record, 3)turnsapp/A.phpinto/A.php.filterIgnored()passes that path togit check-ignore, git exits with code 128, and any exit code other than 0 or 1 becomesMissingDependency('Tia mode', 'git').Fix
Test
tests/Features/Tia/WorktreeRename.phpbuilds the repository shape above and asserts that both paths remain in the changed file list. It fails on5.xand passes with this change.Verification
php bin/pest tests/Features/Tia/WorktreeRename.phpfails before the change and passes after it.