<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><div></div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">It's not completely clear to me how the monorepository would be created,<br class="">and thus, how it would be structured. I understand each component gets<br class="">its own subdirectory. I'm talking about how the underlying history is<br class="">represented.<br class=""></div></div></blockquote><div><br class=""></div><div>Similarly as <a href="http://llvm.org/svn/llvm-project/" class="">http://llvm.org/svn/llvm-project/</a></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class=""><blockquote type="cite" class="">TLDR: The answer is no: you have to see it as it is today, i.e. a<br class="">single SVN repo containing all the sub-projects, and “exports” in<br class="">individual repositories.<br class=""></blockquote><br class="">So the SVN version isn't using externals? I haven't ever looked at that<br class="">repository. I didn't even know it existed until reading the document.<br class=""></div></div></blockquote><div><br class=""></div><div>What I am referring here to is: <a href="http://llvm.org/svn/llvm-project/" class="">http://llvm.org/svn/llvm-project/</a></div><div>The SVN repo is a monorepo where the history of the subproject is “weaved”. And we are still able to export to individual git repositories.</div><div><br class=""></div><div>This is what would be the new monorepo, except that the source would be git instead of SVN, and we would continue to synchronize to <a href="http://llvm.org/git/llvm.git" class="">http://llvm.org/git/llvm.git</a></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class=""><blockquote type="cite" class="">The same thing after: a single git repo containing all the subprojects<br class="">side-by-side and the *same* “exports” in individual repositories.<br class=""></blockquote><br class="">How are those exports managed? Do you use a tool to filter the history<br class="">for a directory in the monorepository and then export that to its own<br class="">repository?<br class=""></div></div></blockquote><div><br class=""></div><div>Yes.</div><div><br class=""></div><div>There are multiple ways to do that actually.</div><div>Conceptually, you can think about it as using `git diff` and `patch -p1` to take every commit to the monorepo and reapply them on the individual repo.</div><div>The easiest way to achieve it though is probably the facility embedded in git itself: `git filter-branch --subdirectory-filter=llvm` <a href="https://git-scm.com/docs/git-filter-branch" class="">https://git-scm.com/docs/git-filter-branch</a></div><div><br class=""></div><div>Also, since GitHub offers an SVN access, you can view the monorepo offering the same SVN access as we have today. So the individual git repository can also be just `git svn` on a subdirectory of the SVN view of the monorepo on GitHub (I’m not sure this sentence is totally clear).</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class=""> I completely understand the benefits of a monorepository. One of<br class=""> the biggest for us was the ability to git-bisect across<br class=""> components. How does git-bisect work with submodules? I have very<br class=""> little experience with submodules but would like to learn more.<br class=""><br class=""><br class="">Fairly easy, the document mentions it in the examples.<br class=""></blockquote><br class="">Ok, I probably skimmed that part since it wasn't directly related to<br class="">describing how the repository would be structured. I'll go back and<br class="">read it in more detail.</div></div></blockquote><br class=""></div><div>Do not hesitate if anything is unclear.</div><br class=""><div class="">— </div><div class="">Mehdi</div></body></html>