git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git check-ignore bug reports

From
LL <13411091171@163.com>
Date
Nov 8, 2019, 08:34 UTC
Message-ID
<60f40fd7.5ff5.16e4a26bded.Coremail.13411091171@163.com>

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. 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/ ---------------------------

Message 1 of 1 in “git check-ignore bug reports”
  1. LNov 8, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.