<div dir="ltr"><div dir="ltr"><div dir="ltr">Having done it for MLIR integration in the monorepo, if you're already rewriting the history you can also immediately move everything in a "flang" subdirectory.<div>It provides better `git log` for files compared to a subtree merge.</div><div><br></div><div>I am using the git-filter-repo tool and invoke it with:</div><div><br></div><div>git-filter-repo --path-rename :mlir/ --force --refs master<br></div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 5, 2019 at 2:27 PM Peter Waller via flang-dev <<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.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">Hi List,<br>
<br>
Following on from previous conversations about integrating f18 with the <br>
llvm monorepo, we wanted to preserve as much history as we can, but also <br>
to have a history without merge commits.<br>
<br>
I've just submitted a pull request containing a "flatten.sh" which tries <br>
to do this. Further information is in the pull request. To help with <br>
review I've pushed the rewritten history up as well.<br>
<br>
Pull request: <a href="https://github.com/flang-compiler/f18/pull/854" rel="noreferrer" target="_blank">https://github.com/flang-compiler/f18/pull/854</a><br>
Example rewritten history: <a href="https://github.com/peterwaller-arm/f18/tree/new" rel="noreferrer" target="_blank">https://github.com/peterwaller-arm/f18/tree/new</a><br>
<br>
It's not perfect yet, in particular for merge commits:<br>
<br>
* The commit messages aren't great (yet).<br>
* We could talk about exactly what metadata we want to preserve for merges.<br>
<br>
For now I've assumed that the second-parent of the merge commit contains <br>
the relevant authorship information for the patch, so the GIT_AUTHOR_* <br>
is taken from this, which is the last commit before a pull request is <br>
merged.<br>
<br>
Once we're happy with this in flang-dev, we can present this to llvm-dev <br>
and adapt the script for submission.<br>
<br>
Your input is welcomed.<br>
<br>
Regards,<br>
<br>
- Peter<br>
<br>
_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a><br>
</blockquote></div>