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

Re: ignoring files/directories in git

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Sep 22, 2008, 08:52 UTC
Message-ID
<20080922085200.GI21650@dpotapov.dyndns.org>
In-Reply-To
<48D74B1C.6020408@panasas.com>
On Mon, Sep 22, 2008 at 10:37:00AM +0300, Boaz Harrosh wrote:
> 
> I have 1.6.0.1 I compiled here, and it has the same problem. So it is
> a very recent fix

I certainly tested 1.6.0.1 and does not have this problem, and it was fixed a long time ago:

===
commit d6b8fc303b389b026f2bf9918f6f83041488989b
Author: Junio C Hamano <gitster@pobox.com>
Date:   Thu Jan 31 01:17:48 2008 -0800
    gitignore(5): Allow "foo/" in ignore list to match directory "foo"
    A pattern "foo/" in the exclude list did not match directory
    "foo", but a pattern "foo" did.  This attempts to extend the
    exclude mechanism so that it would while not matching a regular
    file or a symbolic link "foo".  In order to differentiate a
    directory and non directory, this passes down the type of path
    being checked to excluded() function.
    A downside is that the recursive directory walk may need to run
    lstat(2) more often on systems whose "struct dirent" do not give
    the type of the entry; earlier it did not have to do so for an
    excluded path, but we now need to figure out if a path is a
    directory before deciding to exclude it.  This is especially bad
    because an idea similar to the earlier CE_UPTODATE optimization
    to reduce number of lstat(2) calls would by definition not apply
    to the codepaths involved, as (1) directories will not be
    registered in the index, and (2) excluded paths will not be in
    the index anyway.
===
The patch is included in 1.5.5.
Dmitry
Previous: Boaz HarroshNext: Boaz Harrosh
Message 9 of 12 in “ignoring files/directories in git”
  1. mwolfe38Sep 21, 2008
  2. Boaz HarroshSep 21, 2008
  3. Alex RiesenSep 21, 2008
  4. mwolfe38Sep 21, 2008
  5. Tim HarperSep 22, 2008
  6. Dmitry PotapovSep 21, 2008
  7. mwolfe38Sep 22, 2008
  8. Boaz HarroshSep 22, 2008
  9. Dmitry PotapovSep 22, 2008
  10. Boaz HarroshSep 22, 2008
  11. Andreas EricssonSep 22, 2008
  12. Dmitry PotapovSep 22, 2008

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.