-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-prrelating to the gh pr commandrelating to the gh pr commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
The changedFilesNames function in diff.go does not correctly extract file paths that contain non-ASCII characters when the core.quotePath git parameter is set to true.
Version of GitHub CLI: gh version 2.49.2 (2024-05-13)
Steps to reproduce the behavior
- Set core.quotePath git parameter to true.
- Create a file with non-ASCII characters in its path.
- Run a git diff that includes the file.
- Pass the diff to the changedFilesNames function.
Expected vs actual behavior
Expected behavior: The function should correctly extract and output the file path, even if it contains non-ASCII characters and is quoted due to the core.quotePath git parameter being set to true.
Actual behavior: The function does not correctly extract the file path if it contains non-ASCII characters and is quoted.
Additional context
The issue seems to be with the regular expression used to extract the file paths from the diff. It does not account for quoted paths.
Possible solution
Update the regular expression to correctly handle quoted paths.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-prrelating to the gh pr commandrelating to the gh pr commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic