From owner-freebsd-git@freebsd.org Mon Apr 26 12:31:20 2021 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9009E5FE7F2 for ; Mon, 26 Apr 2021 12:31:20 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FTPQJ3mLKz3KrH; Mon, 26 Apr 2021 12:31:20 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from localhost (acme.spoerlein.net [IPv6:2a05:fc87:1:5::15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: uqs/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 26F1DFADF; Mon, 26 Apr 2021 12:31:20 +0000 (UTC) (envelope-from uqs@freebsd.org) Date: Mon, 26 Apr 2021 14:31:18 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Mark Johnston Cc: freebsd-git@freebsd.org Subject: Re: vendor/illumos merges Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.0.3 (2020-12-04) X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2021 12:31:20 -0000 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 >> - 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