Re: [RFC] extending git-ls-files --exclude.
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:02
Catalin Marinas [off-list ref] 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 [off-list ref]
Subject: Re: [PATCH 1/1] Tell vim the textwidth is 75.
Message-ID: [ref]
> *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)
quoted
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.
quoted
$ cat Documentation/.gitignore # ignore generated html files, # except foo.html which is maintained by hand !foo.html *.htmlWouldn'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.