[PATCH] D57400: Add a .gitignore file to the root that ignores any files outside of the project directories.

Kristina Brooks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 16 15:14:18 PST 2019

kristina added a comment.

I'm in favor of this and I agree with @pcc's points and reasoning behind this.

It means top level projects are explicitly whitelisted and this is something that's going to change far less often and at the same time takes good care to avoid accidental commits to the root of the monorepo. The file itself is easy enough to change if a new top level project is added, while at the same time tacking accidental new top level projects being created by accident because someone happens to have their artifact directories or out-of-tree projects within their tree. But since we know what (official) top level projects there currently are (and there aren't that many), keeping a whitelist seems to make a lot more sense. There are too many possibilities to add to `.gitignore` to account for any accidental stray directory ending up being committed, so I don't think just blacklisting `build` will cut it (as mentioned in D57429 <https://reviews.llvm.org/D57429>).

On the other hand if someone really is adding a new top level project (assuming it's been discussed on `llvm-commits` etc.), they can update the `.gitignore` file. This doesn't stop new top level projects being added, it simply means whoever is adding it is actually doing so explicitly, combined with a relevant update to `.gitignore`.

Hope that makes sense.



More information about the llvm-commits mailing list