Git development
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: "Lê Duy Quang" <leduyquang753@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: `git add` with unmatching case silently fails on case-insensitive file systems
Date: Tue, 21 Jan 2025 18:16:21 +0100	[thread overview]
Message-ID: <20250121171621.GA4932@tb-raspi4> (raw)
In-Reply-To: <7e5e2f26-deda-41a3-af46-79c42435b3c7@gmail.com>

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.

      reply	other threads:[~2025-01-21 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250121171621.GA4932@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=leduyquang753@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox