Cogito and --exclude vs --exclude-per-directory
- From
Karl Hasselström <kha@treskal.com>
- Date
- Nov 16, 2005, 09:36 UTC
- Message-ID
- <20051116093630.GA2783@diana.vm.bytemark.co.uk>
[Note: this experiment was done with git 0.99.9g and Cogito 0.15.1, so ]
It seems that --exclude patterns always take precedence over --exclude-per-directory patterns. For example:
$ ls -a ./ ../ .bar bar.txt .foo foo.txt .git/ .gitignore
$ cat .gitignore !.bar
$ git-ls-files -o --exclude='.*' --exclude='!.bar' .bar bar.txt foo.txt
$ git-ls-files -o --exclude='.*' --exclude-per-directory=.gitignore bar.txt foo.txt
Is this the intended behavior?
Since Cogito specifies a few "default" ignore patterns with --exclude, (such as .* and *.o) these become impossible to override with ! patterns in .gitignore files. In effect, the default patterns are given priority over user-supplied patterns.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle