Re: [RFC] extending git-ls-files --exclude.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 25, 2005, 19:58 UTC
- Message-ID
- <7vk6jelkty.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <tnxmzobutsf.fsf@arm.com>
Catalin Marinas <catalin.marinas@gmail.com> 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 <pasky@suse.cz>
Subject: Re: [PATCH 1/1] Tell vim the textwidth is 75.
Message-ID: <20050722205948.GE11916@pasky.ji.cz> > *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)Show 5 quoted lines
>> 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.
Show 9 quoted lines
>> $ 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.