[Vcs-fast-import-devs] [RFC] Thoughts on ignore files

Shawn O. Pearce spearce at spearce.org
Mon Sep 21 20:18:18 BST 2009

John Arbash Meinel <john at arbash-meinel.com> wrote:
> Rusty Russell wrote:
> > 
> > Yep, .vcignore.  Mercurial was reluctant to take the hit for per-directory
> > ignores, and there's always the question of unignores.
> > 
> > IMHO, per-dir is pretty much a requirement for large projects (eg. linux
> > kernel), but we could make it conditional on there being a top-level
> > .vcignore file.
> What do you specifically mean by 'per-dir'?

By "per-dir" they mean that the ignore rules for the contents of
a given directory a specified by a ".???ignore" file within that
one directory.  This allows different subsystems to have their own
ignore rule list, reducing merge conflicts as there is no single
global ignore list.

> And is that covered with:
> foo/**/*.o
> in the top level ignore?

No.  Yes, some systems might support a pattern like this, but this
is assuming you can manage having a single top level ignore list
in your project.
> Does git have per-dir?

Yes.  A ".gitignore" may appear in any subdirectory, and its
rules cover that directory and its children.  A lower level
ignore file overrides a higher level one.  That is, the rules in
"a/b/c/.gitignore" override the rules in "a/.gitignore" if they
both match the same file.  (Git supports both ignore and not ignore
rules in the same file.)

> At least from the term it makes me think you mean
> having ".vcsignore" files spread throughout the tree. What does that
> specifically gain versus something like ** ?

See above about reducing merge conflicts coming from different
subsystems in the directory tree.

More information about the bazaar mailing list