git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: TDD Guru <tddguru@gmail.com>
To: git@vger.kernel.org
Subject: gitignore pattern matching issue with Windows
Date: Mon, 28 Jul 2025 14:09:08 -0700	[thread overview]
Message-ID: <CAK2EJNO-FY+TzAnwtOhAgbWpnBP1d8yfjPidWSd=rVKM6rrdhQ@mail.gmail.com> (raw)

  Git does not seem to properly handle the pattern [AB] but it does handle [ab].

Here is the demonstration of the bug:

C:\gitbug>git --version
git version 2.50.1.windows.1

C:\gitbug>echo [ab] > .gitignore

C:\gitbug>type .gitignore
[ab]

C:\gitbug>git check-ignore -v a
.gitignore:1:[ab]       a

C:\gitbug>git check-ignore -v b
.gitignore:1:[ab]       b

C:\gitbug>git check-ignore -v A
.gitignore:1:[ab]       A

C:\gitbug>git check-ignore -v B
.gitignore:1:[ab]       B

C:\gitbug>echo [AB] > .gitignore

C:\gitbug>type .gitignore
[AB]

C:\gitbug>git check-ignore -v a

C:\gitbug>git check-ignore -v b

C:\gitbug>git check-ignore -v A

C:\gitbug>git check-ignore -v B

C:\gitbug>git config core.ignorecase
true

C:\gitbug>ver

Microsoft Windows [Version 10.0.19045.6093]

C:\gitbug>

Rex McCarthy

             reply	other threads:[~2025-07-28 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 21:09 TDD Guru [this message]
2025-07-28 22:36 ` gitignore pattern matching issue with Windows Junio C Hamano

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='CAK2EJNO-FY+TzAnwtOhAgbWpnBP1d8yfjPidWSd=rVKM6rrdhQ@mail.gmail.com' \
    --to=tddguru@gmail.com \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).