[llvm-dev] [RFC] One or many git repositories?

via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 8 11:40:50 PDT 2016


Mehdi Amini <mehdi.amini at apple.com> writes:

>     Yes, though I was only able to figure out how to see an actual
>     document by clicking "download raw diff." I'm not sure that's
>     giving me the latest version. Is there another convenient way to
>     view the document, preferable with the Markdown rendered?
>     
>
> Sure, what about a PDF?

Thanks!  Is this auto-generated somewhere as the document is updated?

> What I am referring here to is: http://llvm.org/svn/llvm-project/
> 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.

Yes, I later realized what you are saying here.  I sent a follow-up
e-mail with some additional questions.

>     How are those exports managed? Do you use a tool to filter the
>     history for a directory in the monorepository and then export that
>     to its own repository?
>     
>
> Yes.
>
> There are multiple ways to do that actually.
> 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.
> The easiest way to achieve it though is probably the facility embedded
> in git itself: `git filter-branch --subdirectory-filter=llvm`
> https://git-scm.com/docs/git-filter-branch

Ok, that's what I assumed you would do (filter-branch).  Again, the
follow-up e-mail has some additional questions about this.

> 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).

Oh, that's kind of cool!  Are lots of people going to continue using
SVN?  I've been assuming that folks would gradually transition over and
there'd come a point where we could shut down SVN support.

>     
>         I completely understand the benefits of a monorepository. One
>         of the biggest for us was the ability to git-bisect across
>         components. How does git-bisect work with submodules? I have
>         very little experience with submodules but would like to learn
>         more.
>         
>         
>         Fairly easy, the document mentions it in the examples.
>
>     Ok, I probably skimmed that part since it wasn't directly related
>     to describing how the repository would be structured. I'll go back
>     and read it in more detail.
>
> Do not hesitate if anything is unclear.

I didn't.  :)  I made some comments on bisect in my follow-up.

                              -David


More information about the llvm-dev mailing list