[clangd-dev] [monorepo] Much improved downstream zipping tool available

Björn Pettersson A via clangd-dev clangd-dev at lists.llvm.org
Thu Jan 31 01:16:43 PST 2019



> -----Original Message-----
> From: David Greene <dag at cray.com>
> Sent: den 30 januari 2019 22:44
> To: Björn Pettersson A <bjorn.a.pettersson at ericsson.com>
> Cc: llvm-dev at lists.llvm.org; cfe-dev at lists.llvm.org; openmp-
> dev at lists.llvm.org; clangd-dev at lists.llvm.org; libclc-
> dev at lists.llvm.org; libcxx-dev at lists.llvm.org; lldb-dev at lists.llvm.org
> Subject: Re: [monorepo] Much improved downstream zipping tool available
> 
> Björn Pettersson A <bjorn.a.pettersson at ericsson.com> writes:
> 
> > In llvm (split) we have:
> >
> >   UL4->UL3->UL2->UL1->UL0
> >                    \
> >          ...->DL2->DL1
> >
> > In clang (split) we have:
> >
> >   UC4->UC3->UC2->UC1->UC0
> >                    \
> >          ...->DC2->DC1
> >
> >
> > DL1 is a commit that updates the clang submodule to DC1 (and in this
> > scenario at the same time merges UL1 and DL2 in llvm).
> 
> Ok, in that case I would expect the resulting history to look like
> this:
> 
>     UL4->UC2->UL3->UL2->UL1->UL0->UC1 <- monorepo/master
>                          |         \
>                          \          `---.
>                           `------------. \
>                                         \|
>                             ... ->DL2->DL1/DC2 <- zip/master
>                                         /
>                             ... ->DC2--'
> 
> As a submodule update, DC1 is "inlined" into DL1 and its commit message
> is appended to that of DL1.  I'm presuming here that llvm never updated
> the clang submodule to DC2, so it remains an independent commit.
> 
> The inlining is done assuming that submodule updates represent a single
> logical change.  Submodule updates are assumed to be related to
> whatever
> changes happen in the umbrella so they all get smushed together into
> one
> commit.
> 
> The edge UC1->DL1 represents the use of UC1 tree for every project
> *except* llvm, because clang was a submodule of llvm (and updated to
> DC1
> which merged UC1) and no other project was a submodule in llvm.  DL1
> still has the llvm tree from UL1 plus any local changes you may have
> made.

I still do not understand how that actually works technically, but maybe
it does if you say so. But I also believe that "git log" etc on DL1/DC2
will show that commit UL0 is part of my tree (which it isn't?). This will
be really confusing when looking back at the history when debugging etc.



More information about the clangd-dev mailing list