git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: L <13411091171@163.com>
To: git@vger.kernel.org
Subject: git check-ignore bug reports supplement
Date: Fri, 8 Nov 2019 17:23:59 +0800 (CST)	[thread overview]
Message-ID: <42266508.6960.16e4a53d99b.Coremail.13411091171@163.com> (raw)

When the gitignore file has consecutive ^M$ special symbols, running the "git check-ignore '<pathname>/'" command will prompt '<pathname>/' exists (even if it doesn't exist), and prompts '<pathname>/' in the last consecutive ^M$ location.
Noto: All command run in GitBash.
My English is very bad, please forgive me.

environment:
  windows10
  git version 2.23.0.windows.1

for example:

.gitignore normal view
---------------------------
### Android template
# Built application files
*.apk
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
release/

# Gradle files
.gradle/
build/
---------------------------

.gitignore detailed view
---------------------------
     1  ### Android template^M$
     2  # Built application files^M$
     3  *.apk^M$
     4  *.ap_^M$
     5  *.aab^M$
     6  ^M$
     7  # Files for the ART/Dalvik VM^M$
     8  *.dex^M$
     9  ^M$
    10  # Java class files^M$
    11  *.class^M$
    12  ^M$
    13  # Generated files^M$
    14  bin/^M$
    15  gen/^M$
    16  out/^M$
    17  release/^M$
    18  ^M$
    19  # Gradle files^M$
    20  .gradle/^M$
    21  build/^M$
---------------------------


project directory
---------------------------
drwxr-xr-x 1 L 197121   0 11月  8 16:13 ./
drwxr-xr-x 1 L 197121   0 11月  8 16:12 ../
drwxr-xr-x 1 L 197121   0 11月  8 16:13 .git/
-rw-r--r-- 1 L 197121 226 11月  8 16:17 .gitignore
drwxr-xr-x 1 L 197121   0 11月  8 16:12 .idea/
---------------------------


run git check-ignore command
---------------------------
$ git check-ignore -v '.idea/'
.gitignore:18:  .idea/
$ git check-ignore -v '.idea/sfsf/'
.gitignore:18:  .idea/sfsf/
---------------------------

                 reply	other threads:[~2019-11-08  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=42266508.6960.16e4a53d99b.Coremail.13411091171@163.com \
    --to=13411091171@163.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).