Accidental new top-level monorepo directory

https://reviews.llvm.org/rL353906 introduced (presumably accidentally) the “b” top-level directory to the monorepo. The files should be moved to their proper location, but I’m also wondering if there’s any way to prevent accidental top-level additions like this.

Thanks,

Shoaib

Hi Shoaib,

Thanks for pointing this out. I had not idea this happened or that it was even possible to create top level directories in the monorepo. I assumed everything went through git-svn as it did in the past? I removed the directory again in r353913. I agree that it would be great if this wasn’t possible at all.

Thanks,
Jonas

Hi Shoaib,

Thanks for pointing this out. I had not idea this happened or that it was even possible to create top level directories in the monorepo. I assumed everything went through git-svn as it did in the past? I removed the directory again in r353913. I agree that it would be great if this wasn't possible at all.

I can look into ways to prevent this from happening. Can you
give me a little more information on what happened? Did you
add the 'b' directory while doing development and then accidentally
commit it or did the monorepo script add it? Did you commit using
git or svn?

Thanks,
Tom

Note that git usually presents diffs as a/path vs. b/path, but new files
compare the old as /dev/null, e.g.

$ git status --short
A foo
$ git diff --cached
diff --git a/foo b/foo
new file mode 100644
index 000000000000..45b983be36b7
--- /dev/null
+++ b/foo
@@ -0,0 +1 @@
+hi

Hi Shoaib,

Thanks for pointing this out. I had not idea this happened or that it was even possible to create top level directories in the monorepo. I assumed everything went through git-svn as it did in the past? I removed the directory again in r353913. I agree that it would be great if this wasn’t possible at all.

I can look into ways to prevent this from happening.

I suppose that one way would be to add a .gitignore file to the top level that ignores any unknown directories, as I proposed in https://reviews.llvm.org/D57400 .

Peter