Shouldn't tools and projects in .gitignore go to .gitmodules?

I think it is erroneous to have the subrepository projects and tools listed in .gitignore.

Instead of being ignored, methinks they should be listed as submodules in .gitmodules:

[submodule "tools/clang"]
        path = tools/clang
        url = ../clang.git
[submodule "projects/compiler-rt"]
        path = projects/compiler-rt
        url = ../compiler-rt.git
[submodule "projects/test-suite"]
        path = projects/test-suite
        url = ../test-suite.git
[submodule "tools/lldb"]
        path = tools/lldb
        url = ../lldb.git
[submodule "tools/lld"]
        path = tools/lld
        url = ../lld.git

I’ve attached a patch just in case this was the right way to go.

Cheers, Kuba Ober

llvmgit.patch (894 Bytes)

I think it is erroneous to have the subrepository projects and tools listed in .gitignore.

Instead of being ignored, methinks they should be listed as submodules in .gitmodules:

After working with submodules in Boost, the current situation for llvm is much better. The directory structure is purely due to build system concerns and is largely unrelated to source control concerns.

I understand, but as things are, for one to actually use git with llvm subprojects checked out within the tree, one has to add those submodules manually. Having them listed as submodules does not force a pull, it only enables one to pull them when desired. This is especially handy when using frontends to git.

Fixing it would give git users a helping hand with no ill effects. If someone wants not to pull the submodule within the tree, and wants to, say, use clang or lldb out-of-tree, it’s fine.

Cheers, Kuba