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

git-ls-files in subdirectories ignore higher-up .gitignore

From
PRPavel Roskin <proski@gnu.org>
Date
Jan 24, 2006, 17:59 UTC
Message-ID
<1138125570.24415.11.camel@dv>
Hello!

git-ls-files appears to behave in a way that may be unexpected to the users. When run in a subdirectory, git-ls-files never reads .gitignore or whatever is specified by --exclude-per-directory in the parent directories.

This can be demonstrated in git's own repository:

$ touch t/test.o $ git-ls-files --others --exclude-per-directory=.gitignore $ cd t $ git-ls-files --others --exclude-per-directory=.gitignore test.o $

Before I attempt to fix it, I'd like to make sure it's a bug, not a feature.

-- 
Regards,
Pavel Roskin
Next: Junio C Hamano
Message 1 of 6 in “git-ls-files in subdirectories ignore higher-up .gitignore”
  1. Pavel RoskinJan 24, 2006
  2. Junio C HamanoJan 25, 2006
  3. Sam RavnborgJan 25, 2006
  4. ls-files: honour per-directory ignore file from higher directories.Junio C Hamano, Feb 9, 2006
  5. Pavel RoskinFeb 10, 2006
  6. Junio C HamanoFeb 10, 2006

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.