[llvm-dev] LLVM projects and monorepo.

Francesco Petrogalli via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 4 12:44:22 PST 2019



> On Dec 4, 2019, at 9:34 AM, Justin Bogner <mail at justinbogner.com> wrote:
> 
> Francesco Petrogalli via llvm-dev <llvm-dev at lists.llvm.org> writes:
>>> On Nov 15, 2019, at 1:52 AM, Alex Denisov <1101.debian at gmail.com> wrote:
>>> 
>>>> I think I can just get the patch and remove the `llvm` on top of
>>>> the paths, but that’s not a scalable approach.
>>> 
>>> IIRC, the -p option of 'patch' is exactly for doing this. Would that
>>> simplify your use-case?
>>> 
>> 
>> Yes, for a single patch that would work. If there is a way to do that
>> also when `git cherry-picking` from monorepo to llvm-only it would be
>> great.
> 
> As Paul implied, you may be able to use git's "subtree" merge strategy
> to help with this:
> ```
> git cherry-pick -Xsubtree=llvm ...
> ```
> 


The subtree strategy worked perfectly, thank you!

```
>$ git cherry-pick -Xsubtree=llvm eac93757c39bbd2b2290d7543619eebd770c3141
[SHOJICOMP-4520 d6b529e] [VectorUtils] API for VFShape, update VFInfo.
 Date: Wed Nov 20 20:51:24 2019 +0000
 5 files changed, 292 insertions(+), 8 deletions(-)
```

Francesco

> The `-Xsubtree=llvm` flag also works with other git commands like merge
> and rebase if you need to do something more complicated.



More information about the llvm-dev mailing list