Git development
 help / color / mirror / Atom feed
* Cogito and --exclude vs --exclude-per-directory
@ 2005-11-16  9:36 Karl Hasselström
  2005-11-16  9:38 ` Karl Hasselström
  2005-11-16 19:01 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Karl Hasselström @ 2005-11-16  9:36 UTC (permalink / raw)
  To: git

[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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-16 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-16  9:36 Cogito and --exclude vs --exclude-per-directory Karl Hasselström
2005-11-16  9:38 ` Karl Hasselström
2005-11-16 19:01 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox