From owner-freebsd-git@freebsd.org Tue Dec 1 09:59:06 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 BCA3C4A41FC for ; Tue, 1 Dec 2020 09:59:06 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Clcy24cHsz3HYf for ; Tue, 1 Dec 2020 09:59:06 +0000 (UTC) (envelope-from rene@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 9C44B4A41FB; Tue, 1 Dec 2020 09:59:06 +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 9C0094A3F4E for ; Tue, 1 Dec 2020 09:59:06 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Clcy22zldz3HbJ; Tue, 1 Dec 2020 09:59:06 +0000 (UTC) (envelope-from rene@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1606816746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XRuvhQ0Gw+vyugy35AeMjCKBWW/RkyH+mncZ8HUG2oM=; b=mZWeeFZcE/fNPXExAwbmaI47wqeB7ryHFn9chtnYJ37I1nigjsobZu4ghsi36mI8+T9pwe TnUIfYbpGp7xxTMn1zFaKcIxIUD9+akCb68rFJQk6GCfU/+16ZQu+TDE1cAKmHtrSScoU5 UyX+aKUlcWdn00rbhtKqsLz5vHgGJXo1rAO0feEtDYHlHM6jwdtiLdMnxjRS6VwcQCpTjk wqf4ajpAaj1cD+JB+fSSxSyZGMpchhEq+HFDQO+HAztfet1x6cRggaIA4bcn5HZa1l19jW a9fiXzgJVcGEXAE5LXeajZVUrn1+2SynsSnBNHICc5gRMGYqGoXOuTpWsXg3tw== Received: by freefall.freebsd.org (Postfix, from userid 1185) id 4DFA9D602; Tue, 1 Dec 2020 09:59:06 +0000 (UTC) Date: Tue, 1 Dec 2020 09:59:06 +0000 From: Rene Ladan To: Chris Rees Cc: Adam Weinberger , git@freebsd.org, "portmgr@FreeBSD.org" Subject: Re: converting rmport to git Message-ID: <20201201095906.GA50345@freefall.freebsd.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7246FB00-655B-4BD4-BC99-B87E4595969C@FreeBSD.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1606816746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XRuvhQ0Gw+vyugy35AeMjCKBWW/RkyH+mncZ8HUG2oM=; b=csQt5LGCHamg0+p5AX9bFj1FEURvl8G9AdPA6BFXaokdFzhMhd32gQVC+iwUm/GTKJ9Fsa BqjyaAUZ5Tre9hyAUmPbkvKEntjjQQ+ijjyqbGR21HrO7iXdfyb2oracgvMzr0ELXsnkYg eAfnpsLAqLyGPIZwqS+5VqW2uzvXGJI2AJL3JtskYHWRZ++tsiRgEwi28H6rZRWBiNHv5F xhPtXNIjG2YxnXuqlWzD+aPGdRP5nUFsmfmuReH4HeO4vNMkmg+5keomZSGiYlyyBLKoX4 TJ/OFoTgdweWi2qWNTRy9RqIZVURf08sut5xmgdrlrAYzTIr0wE9XuYRql7Vmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1606816746; a=rsa-sha256; cv=none; b=KMlJa111BWj8X2B34IVoQuq5sdZI1wp9CPOHfAau0/BQduZ7jJb9fpSWOZ31itFNvNUsEf 2Swg70bjLnWvbRzfgUlXMGLXFH1O0B30du8f8weicqCRhvnoLWBu/H4+qJ0yHcGwMb+gQA hsdBzgpwfPOisCXSAdEoVKYaGXrvN2yz/TGNkV4vDuGDTHfUC7Mpu3u8Iwc5d1D6DsBs1n DhaRlIvmyyySHQYNRDTKOGTo2ypAO3nxCcuKpEnYRaVnYd9NPCHu4SdhS1/QDvloVnbGzJ i5/W/crYiGZ73J3cIOUdSt0+4AoKgPPgG20MWhZhoRDbzHnp8b/slpZ6YnNR0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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: Tue, 01 Dec 2020 09:59:06 -0000 On Mon, Nov 30, 2020 at 08:19:40PM +0000, Chris Rees wrote: > > > On 30 November 2020 10:53:37 GMT, Rene Ladan wrote: > >On Sun, Nov 29, 2020 at 11:26:41PM +0000, Chris Rees wrote: > >> Hey, > >> > >> On 29 November 2020 17:12:21 GMT, Adam Weinberger > >wrote: > >> >On Sun, Nov 29, 2020 at 9:47 AM Rene Ladan wrote: > >> >> > >> >> Hello, > >> >> > >> >> I started converting some scripts in the port tree to git, and hit > >a > >> >design > >> >> decision with Tools/scripts/rmport. > >> >> > >> >> In the current SVN world it checks out a sparse copy of the tree > >to > >> >work on > >> >> (just LEGAL, MOVED, category/Makefile and the port directory > >itself) > >> >and > >> >> commits from that copy. This has the advantage of not clobbering > >an > >> >existing > >> >> work tree and indeed does not need a pre-existing checkout at all. > >> > > >> >Git uses topic branches for not-clobbering-the-tree purposes, so > >your > >> >proposal below seems like the git analogue of an svn sparse tree. > >> > > >> >> I could try to replicate this with git, but it seems like partial > >> >checkouts > >> >> (not to be confused with shallow checkouts) are a bit of an > >> >afterthought [1] > >> >> and need reasonably recent versions of the git binary and > >protocol. > >> >An > >> > > >> >If our users will have to install git from ports or pkg, is there > >much > >> >concern that people won't be on a reasonably recent version of git? > >> > >> Nah, we can just check the version and complain easily. > >> > >> >> alternative would be to just create a temporary branch on an > >existing > >> >> checkout, say rmport-$USER-$EPOCH, do the removal work there, > >merge > >> >that > >> >> branch to main, remove the temporary branch and push the new main. > >> >This feels > >> > > >> >That definitely seems more consistent with the git workflow. Create > >a > >> >topic branch, do the thing, merge the branch, push the change. > >> > >> > >> Looks like a great idea. I'm starting to get used to git, but I'm > >happy if you (René) want to push ahead with this, as I'm sure my > >approach would be dreadful.... > >> > >OK, I'll rewrite the script to use the branch workflow. This does > >assume > >having an existing clone of the git repository present, but I guess > >that > >is a safe assumption if you are a ports committer :) > > > >The addport and mfh scripts could use a similar workflow. Speaking of > >addport, it uses your website to check if a port pre-existed, that > >website > >should learn about git too? > > Well... I don't think git actually does git cp properly does it? As in, doesn't it cleverly work it out for itself? Git only knows about mv, not cp :( > > 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. René