Skip to content

fix(bin): case sensitivity in file path handling for git operations - #75

Merged
metalwarrior665 merged 3 commits into
masterfrom
claude/fix-schema-case-sensitivity-KLTtW
Apr 6, 2026
Merged

fix(bin): case sensitivity in file path handling for git operations#75
metalwarrior665 merged 3 commits into
masterfrom
claude/fix-schema-case-sensitivity-KLTtW

Conversation

@metalwarrior665

Copy link
Copy Markdown
Member

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

  • Modified classifyFileChange to accept originalFilePath instead of pre-lowercased paths
  • Moved the lowercase conversion inside the function to keep the original casing available
  • Updated the call to isCosmeticOnlyJsonSchemaChange to use originalFilePath instead of lowercaseFilePath since git operations are case-sensitive on Linux
  • Removed the pre-processing step that converted all file paths to lowercase before classification
  • Updated logging sections to use original file paths from filepathsChanged instead of the lowercased array

Implementation Details

  • The lowercase conversion is now performed locally within classifyFileChange for case-insensitive matching logic
  • A comment clarifies why originalFilePath must be used for the isCosmeticOnlyJsonSchemaChange call
  • This ensures git operations receive the correct file path casing while classification logic remains case-insensitive

https://claude.ai/code/session_01NHgddik3UA7sDUi12hBUud

claude added 3 commits April 6, 2026 12:37
`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
@metalwarrior665 metalwarrior665 changed the title Fix case sensitivity in file path handling for git operations fix(bin): case sensitivity in file path handling for git operations Apr 6, 2026
@metalwarrior665
metalwarrior665 merged commit ae15cb6 into master Apr 6, 2026
9 of 10 checks passed
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.

3 participants