fix(bin): case sensitivity in file path handling for git operations - #75
Merged
Merged
Conversation
`git show` on Linux is case-sensitive, so passing a lowercased path (e.g. `input_schema.json`) fails when the actual file in git is `INPUT_SCHEMA.json`. This fix keeps both the lowercased path (for actor name matching and `.endsWith()` checks) and the original case-preserved path (for the `git show` call in `isCosmeticOnlyJsonSchemaChange`). https://claude.ai/code/session_01NHgddik3UA7sDUi12hBUud
Callers no longer need to pre-compute lowercaseFilePath; the function owns the case-folding for matching while still using the original path for git show. https://claude.ai/code/session_01NHgddik3UA7sDUi12hBUud
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.
Summary
This change fixes a case sensitivity issue in file path handling where lowercase file paths were being passed to
git show, which fails on case-sensitive filesystems like Linux. The fix preserves the original file path casing for git operations while maintaining case-insensitive matching for classification logic.Key Changes
classifyFileChangeto acceptoriginalFilePathinstead of pre-lowercased pathsisCosmeticOnlyJsonSchemaChangeto useoriginalFilePathinstead oflowercaseFilePathsince git operations are case-sensitive on LinuxfilepathsChangedinstead of the lowercased arrayImplementation Details
classifyFileChangefor case-insensitive matching logicoriginalFilePathmust be used for theisCosmeticOnlyJsonSchemaChangecallhttps://claude.ai/code/session_01NHgddik3UA7sDUi12hBUud