Re: [RFC] extending git-ls-files --exclude.

From: Junio C Hamano <>
Date: 2005-07-26 05:58:01
Catalin Marinas <> writes:

> I think it would make more sense for the exclude-per-directory
> patterns to be local to that directory only, without recursively
> preserving them for subdirectories.

I personally do not have preference either way, but am slightly
biased towards the "cumulative" behaviour the patch attempts to
implement, which was what Pasky said he wanted to have.

    Date: Fri, 22 Jul 2005 22:59:48 +0200
    From: Petr Baudis <>
    Subject: Re: [PATCH 1/1] Tell vim the textwidth is 75.
    Message-ID: <>

    > *3* .gitignore in the cwd is used in Cogito, if I am not
    > mistaken.

    Yes. There were several discussions about this in the past, with no
    clear outcome, IIRC. I would prefer:

      ~/.git/ignore per-user
      /.git/ignore per-repository
      .gitignore per-directory (cummulative with parent directories)

>> An exclude pattern is of the following format:
> [...]
> That's fine. Actually, the Porcelain would care much about it since it
> gets the information already filtered by git.

Your saying "fine" is a relief.  This change aims at helping
Porcelain people by making it less likely for Porcelain to need
its own filtering.  As you say, if ls-files filters more than
the Porcelain wants, that's a bigger problem.

>>     $ cat Documentation/.gitignore
>>     # ignore generated html files,
>>     # except foo.html which is maintained by hand
>>     !foo.html
>>     *.html
> Wouldn't it be clearer to have the general rules first (*.html),
> overridden by the more specific ones (!foo.html)? Just my opinion, I
> don't know what others think.

I do not know, either, but I do know it is consistent with the
"first match determines fate" rule and cleaner to implement.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at
Received on Tue Jul 26 06:02:25 2005

This archive was generated by hypermail 2.1.8 : 2005-07-26 06:02:28 EST