From owner-freebsd-git@freebsd.org Wed Dec 2 18:31:17 2020 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 330E94A2E59 for ; Wed, 2 Dec 2020 18:31:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4CmSGY0FDZz3Prr for ; Wed, 2 Dec 2020 18:31:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by mailman.nyi.freebsd.org (Postfix) id 069444A2EED; Wed, 2 Dec 2020 18:31:17 +0000 (UTC) Delivered-To: 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 065B44A3302 for ; Wed, 2 Dec 2020 18:31:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CmSGX6gy6z3PXC; Wed, 2 Dec 2020 18:31:16 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id F06E23C0199; Wed, 2 Dec 2020 18:31:15 +0000 (UTC) Date: Wed, 2 Dec 2020 18:31:15 +0000 From: Brooks Davis To: Ulrich Sp??rlein Cc: Warner Losh , Chris Rees , "portmgr@FreeBSD.org" , git@freebsd.org, Adam Weinberger Subject: Re: converting rmport to git Message-ID: <20201202183115.GE18452@spindle.one-eyed-alien.net> References: <20201129164707.GA31739@freefall.freebsd.org> <14871125-A032-4980-8DB1-0210E34D5A11@FreeBSD.org> <20201130105337.GA42359@freefall.freebsd.org> <7246FB00-655B-4BD4-BC99-B87E4595969C@FreeBSD.org> <20201201095906.GA50345@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cHMo6Wbp1wrKhbfi" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 4CmSGX6gy6z3PXC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Wed, 02 Dec 2020 18:31:17 -0000 --cHMo6Wbp1wrKhbfi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 02, 2020 at 03:33:47PM +0100, Ulrich Sp??rlein wrote: > On Tue, 2020-12-01 at 09:36:48 -0700, Warner Losh wrote: > >On Tue, Dec 1, 2020 at 2:59 AM Rene Ladan wrote: > >> On Mon, Nov 30, 2020 at 08:19:40PM +0000, Chris Rees wrote: > >> > The only reason I wrote the removed ports thing is because we were > >> losing the link between old and new version when a port was removed and > >> readded. Is git likely to DTRT without it? > >> I don't know, perhaps we can search the git history itself. > >> > > > >The typical way I've seen this done is to add the metadata to either the > >'bring it back' commit (so like our MFC After: lines), or using the 'not= es' > >feature in some way. The upside to either of these techniques is that you > >preserve the data. the downside is that neither is known by git log. > > > >I've also seen weird merge commits attempted for this since git log knows > >about them... The only problem is they are sufficiently weird that git l= og > >does odd things for everybody across them... > > > >I don't anticipate that git will do the right thing w/o help because the > >ports tree has so many nearly identical files. For simple ports, the > >Makefile could have been copied from anywhere, likewise some of the pkg* > >files. Though for simple ones, lost history doesn't lose much that's > >useful. For complex ones, it likely would do close to the right thing si= nce > >complex ports, kinda by definition, are different. Though I'd test this > >notion (because as I'm typing this I find myself making too many mental > >reservations)... > > > >To be honest, though, I think this is an area where some experimentation= to > >understand the alternatives is needed because this use case is relatively > >rare in the larger open source community. >=20 > Isn't the ports copy or move fixable by doing it in 2 steps? That is,=20 > one commit is copying or moving the file without any modification inside= =20 > the file whatsoever (sic!). This is obviously a bogus state for the=20 > ports tree, so a 2nd commit then changes the content of that new file to= =20 > adjust its name or category or whatever. >=20 > The good thing about a DVCS is that these 2 commits will obviously be=20 > pushed together, atomically, so no one will ever see the broken=20 > intermediate state. Unless of course you want to `git bisect` stuff, so= =20 > it's not a panacea and also brittle as it depends on a human doing the=20 > right thing. The state need not even be broken, just partially orphaned (e.g. perform the copy, but don't hook the port up until the second commit.) Likewise for resurrection, revert the removal, but don't include the addition to /Makefile in the revert. This would work best if deletes are done as separate commits, but that shouldn't be a big deal. -- Brooks --cHMo6Wbp1wrKhbfi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJfx91zAAoJEKzQXbSebgfA/SQIAIKLaFbsvcimG9zYBwaXNkmr pkH+m8ogGuqu1yZR32Lz9tk+qivJmHY8pJkBTyeUg6pFGkr9ycn9DGHG5l271xr4 LnpA6yoaIV8ID5sEGNYJ/LsosoxvDcGHK9D4O86T8+GJewq4/+PcfakHFFGrj3nW opoc4oRqBSOw94ZYH4rlkGgA6vFdFleaGekqJlmhQSuBe5S2C/V71imwB10rMWm8 yUv/XdEvSX/M7eqaYo/uioZaxOJHMKJ6OfNyFD16xCVAgO3lcXhUv4Z40MoWpH5o 8DxHU1H9REnyulNVeEPcZpoWsBEND0wrCANVmTkrMs7DxMJDq0vxZszDgN0VDBY= =WB/8 -----END PGP SIGNATURE----- --cHMo6Wbp1wrKhbfi--