<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 18, 2019 at 8:34 AM David Greene <<a href="mailto:greened@obbligato.org">greened@obbligato.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">James Y Knight via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> The alternative I had in mind would be to rewrite the commits on the branch<br>
> so that all the files are under an mlir/ subdirectory, and then do a normal<br>
> merge from that.<br>
<br>
I just sent a message about import-downstream-repo.py, shown here:<br>
<br>
<a href="https://github.com/jyknight/llvm-git-migration/pull/6/commits" rel="noreferrer" target="_blank">https://github.com/jyknight/llvm-git-migration/pull/6/commits</a><br>
<br>
The default mode of operation does exactly what James says here. It<br>
rewrites the commits so all blobs are under a specific subdirectory.<br>
Then you can do a merge from the rewritten MLIR HEAD.<br></blockquote><div><br></div><div>I used `git-filter-repo`, but that is exactly what I've been doing actually.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
With the --import-list option you can tell the tool to preserve blobs<br>
from other subprojects alongside the MLIR blobs. I did not test that<br>
functionality much, though.<br>
<br>
With default operation, a checkout of an early MLIR commit would should<br>
only an "mlir" directory in the working directory. </blockquote><div><br></div><div>Right that what I have right now in the repo, for example: <a href="https://github.com/joker-eph/llvm-project-with-mlir/tree/291a8e7ca113c4a8fc597fc0ec1a3a4e4e639f78">https://github.com/joker-eph/llvm-project-with-mlir/tree/291a8e7ca113c4a8fc597fc0ec1a3a4e4e639f78</a></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">With --import-list<br>
you'd see all of the other subproject directories, though the contents<br>
of those other directories wouldn't change as you walked back through<br>
early MLIR history.<br></blockquote><div><br></div><div>OK, but that seems like a "wrong" history: the state would seem quite misleading to me by mixing a recent LLVM with an old MLIR (and the code wouldn't be able to build successfully at any of these revisions).</div><div>Can you clarify why would you prefer this over just a single `mlir` directory?</div><div><br></div><div>Thanks,</div><div><br></div><div>-- </div><div>Mehdi</div></div></div></div>