Re: [RFC] extending git-ls-files --exclude.
- From
Petr Baudis <pasky@suse.cz>
- Date
- Jul 28, 2005, 15:52 UTC
- Message-ID
- <20050728155210.GA17952@pasky.ji.cz>
- In-Reply-To
- <7vd5p73jlu.fsf@assigned-by-dhcp.cox.net>
Hello,
after skimming through it, I think I completely like what you have shown here. I'm only concerned about this:
Dear diary, on Mon, Jul 25, 2005 at 12:49:33AM CEST, I got a letter where Junio C Hamano <junkio@cox.net> told me that...
Show 5 quoted lines
> $ cat Documentation/.gitignore > # ignore generated html files, > # except foo.html which is maintained by hand > !foo.html > *.html
I think this is wrong, and my brief experiments confirm that. I think that the actually useful semantics of exclusion would be for _subsequent_ exclusions, not preliminary ones. You generally don't say "I never want this ignored, but I want the rest of that ignored", but "I want that ignored, except this". This also gives you more flexibility:
*.html !f*.html fo*.html
would ignore *.html and fo*.html, but not any other f*.html filenames. But more importantly,
.gitignore: *.txt Documentation/.gitignore: !*.txt
will not work, which was the whole _point_ of the exclusion.
Could we please have this semantics changed for those reasons?
Thanks,
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox