[flang-dev] Rewriting f18's history for inclusion in llvm monorepo (issue cross-referencing)

Peter Waller via flang-dev flang-dev at lists.llvm.org
Mon Dec 9 03:01:41 PST 2019


Another thought:

Issue and pull-request numbers referenced in a commit message as they 
currently are will create references to issues and pull-requests in the 
LLVM repository, rather than the f18 repository. These will contaminate 
random github issues and pull requests in llvm-project, and make these 
issue numbers confusing for everybody, I think.

I propose to fix this by rewriting the messages as part of history 
rewriting so that #123 becomes flang-compiler/f18#123. This is how 
cross-repository references are specified on github.

If we do this, the reference will be mutual - if you're looking at the 
issue in the f18 repository, it will show any commit in llvm-project 
which references it.

Please note that while I have a prototype rewritten history pushed, 
github is showing references into my f18 fork in f18's issues, which is 
also a bit of a mess. I'll make those go away by deleting the branch and 
if necessary the fork, once it is not of any further use.

Regards,

- Peter

On 05/12/2019 13:27, Peter Waller via flang-dev wrote:
> Hi List,
>
> Following on from previous conversations about integrating f18 with the
> llvm monorepo, we wanted to preserve as much history as we can, but also
> to have a history without merge commits.
>
> I've just submitted a pull request containing a "flatten.sh" which tries
> to do this. Further information is in the pull request. To help with
> review I've pushed the rewritten history up as well.
>
> Pull request: https://github.com/flang-compiler/f18/pull/854
> Example rewritten history: https://github.com/peterwaller-arm/f18/tree/new
>
> It's not perfect yet, in particular for merge commits:
>
> * The commit messages aren't great (yet).
> * We could talk about exactly what metadata we want to preserve for merges.
>
> For now I've assumed that the second-parent of the merge commit contains
> the relevant authorship information for the patch, so the GIT_AUTHOR_*
> is taken from this, which is the last commit before a pull request is
> merged.
>
> Once we're happy with this in flang-dev, we can present this to llvm-dev
> and adapt the script for submission.
>
> Your input is welcomed.
>
> Regards,
>
> - Peter
>
> _______________________________________________
> flang-dev mailing list
> flang-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev


More information about the flang-dev mailing list