* `git add` with unmatching case silently fails on case-insensitive file systems
@ 2025-01-21 7:52 Lê Duy Quang
2025-01-21 17:16 ` Torsten Bögershausen
0 siblings, 1 reply; 2+ messages in thread
From: Lê Duy Quang @ 2025-01-21 7:52 UTC (permalink / raw)
To: git
Good morning,
I am using Git on Windows, whose file system is case-insensitive. If the
working tree has a file called `SourceFile.c`, for example, and I run
`git add sourcefile.c`, I would expect either (a) Git stages
`SourceFile.c` or (b) Git errors with "fatal: pathspec 'sourcefile.c'
did not match any files". However, none of those actually took place;
instead Git did not stage the file and produced no output as if the
command had succeeded, which led me to proceed to committing without
realizing I had missed the file.
I would like to know whether this is intended behavior or I have bumped
into a case-sensitivity bug.
Regards,
Quang
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: `git add` with unmatching case silently fails on case-insensitive file systems
2025-01-21 7:52 `git add` with unmatching case silently fails on case-insensitive file systems Lê Duy Quang
@ 2025-01-21 17:16 ` Torsten Bögershausen
0 siblings, 0 replies; 2+ messages in thread
From: Torsten Bögershausen @ 2025-01-21 17:16 UTC (permalink / raw)
To: Lê Duy Quang; +Cc: git
On Tue, Jan 21, 2025 at 02:52:09PM +0700, Lê Duy Quang wrote:
> Good morning,
>
> I am using Git on Windows, whose file system is case-insensitive. If the
> working tree has a file called `SourceFile.c`, for example, and I run `git
> add sourcefile.c`, I would expect either (a) Git stages `SourceFile.c` or
> (b) Git errors with "fatal: pathspec 'sourcefile.c' did not match any
> files". However, none of those actually took place; instead Git did not
> stage the file and produced no output as if the command had succeeded, which
> led me to proceed to committing without realizing I had missed the file.
>
> I would like to know whether this is intended behavior or I have bumped into
> a case-sensitivity bug.
The thing is that Windows tells us sourcefile.c is there,
even if Sourcefile.c is there.
So that is why neither a) nor b) is happening.
You can call it a bug, or a not-yet-implemented feature.
In any case, just to be shure,
git status
is your friend before doing the commit.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-21 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21 7:52 `git add` with unmatching case silently fails on case-insensitive file systems Lê Duy Quang
2025-01-21 17:16 ` Torsten Bögershausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox