Skip to content

gitmeup --apply aborts when suggested path casing differs from actual file path (Components/ vs components/) #3

@ikramagix

Description

@ikramagix

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

  1. 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
  2. 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 --apply stages 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.1
  • git --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 --porcelain paths (modified, untracked), and/or
    • git ls-files for 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

Metadata

Metadata

Assignees

Labels

area:git-integrationIssues with git, repos, diffs, hookspriority:highUrgent, breaks core flows or many usersstatus:confirmedReproduced and accepted as validtype:bugActual defects in behaviour

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions