-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
gitmeup --apply can abort when the proposed git add path uses different casing than the real path in the repo (example: Components/... vs components/...). On case-sensitive filesystems this produces fatal: pathspec ... did not match any files and gitmeup aborts.
Steps to reproduce
- On a case-sensitive filesystem (Linux is the common case), in any project repo that has a lowercase folder like
components/, modify a file:components/WebGLDisabledPopup.tsx
- Run:
gitmeup --apply
Actual behaviour
gitmeup proposes and executes a command with the wrong path casing and aborts:
Proposed commands:
git add -- Components/WebGLDisabledPopup.tsx
git commit -m 'refactor: Improve WebGL disabled popup browser launch logic'
Executing commands...
+ git add -- Components/WebGLDisabledPopup.tsx
fatal: pathspec 'Components/WebGLDisabledPopup.tsx' did not match any files
Command failed with exit code 128. Aborting.
At the same time, git status shows the real modified file path:
modified: components/WebGLDisabledPopup.tsx
Expected behaviour
One of:
-
gitmeup --applystages the correct file (components/...) and continues, or -
It validates proposed paths before execution, and if a path does not exist:
- auto-corrects casing when a case-insensitive match exists, or
- prompts and shows the closest match, instead of hard-aborting.
Why this matters
The --apply mode is meant to be “safe automation”. A single path casing mismatch causes an immediate abort even though the intended file is clearly present in git status.
Environment
- OS: Ubuntu 24.04.01
- Filesystem case sensitivity: case-sensitive (Linux ext4)
gitmeup --version: 1.0.1git --version: 2.34.1
Implementation suggestion (non-binding)
Before executing git add -- <path>:
-
Check existence or
git ls-files --error-unmatch <path>/test -e <path>. -
If missing, attempt a case-insensitive match against:
git status --porcelainpaths (modified, untracked), and/orgit ls-filesfor tracked files.
-
Substitute the correct path and continue, or stop with a clear message and suggested corrected command.
Minimal workaround (until fixed)
Until fixed:
git add components/WebGLDisabledPopup.tsx
gitmeup --apply