vendor/illumos merges

Ulrich Spörlein uqs at freebsd.org
Mon Apr 26 12:31:20 UTC 2021


On Sun, 2021-04-25 at 17:27:38 -0400, Mark Johnston wrote:
>On Sun, Apr 25, 2021 at 04:02:22PM +0200, Ulrich Spörlein wrote:
>> I don't think you want a subtree merge, especially as things are
>> scattered all over the place. Also note that none of this subtree magic
>> is in any way recorded in the git data, all it does is help you with the
>> 3-way merges (or whatever).
>>
>> So I would do:
>> - import whatever you need into contrib/foo, commit normally.
>> - munge /usr/src to have every kernel and userland stuff (not sure what
>> other merge tools exist, just make sure to copy over file deletions as
>> well :). You could rsync --del two times with the right source/dest
>> pairs, or export a diff/patch from step 1 and apply it under the right
>> prefixes. test, test, test.
>> - write out this tree to git using: git write-tree
>> - then commit this using: git commit-tree -m "my message" -p HEAD -p
>> origin/vendor/illumos <tree hash from previous command>
>> - bump main to point to that hash using git update-ref
>> - git log --graph and inspect the hell out of this
>> - git push, then curse that we disallow merge commits and you need to
>> `git pull --rebase` to advance to the latest published head and that
>> might mess up your merge commit pretty bad :(
>
>Thanks, I'll give this a try.  I need to make quite a few changes to
>various base system files not included in the import, makefiles mainly.
>Presumably these changes should be included in the merge commit?

I think so. If all the changes are supposed to be visible to clients 
(and CI infrastructure) in one go, then 1 visible commit for this on 
main seems to make the most sense.

Let me know if you need further help in wrangling the state of your 
checkout into a sensible commit :)

Cheers
Uli


More information about the freebsd-git mailing list