From owner-freebsd-git@freebsd.org Mon Nov 30 10:53:37 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 763B34773D2 for ; Mon, 30 Nov 2020 10:53:37 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4Cl2CP2cJ9z4vLS for ; Mon, 30 Nov 2020 10:53:37 +0000 (UTC) (envelope-from rene@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 57A914774C4; Mon, 30 Nov 2020 10:53:37 +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 577124774C2 for ; Mon, 30 Nov 2020 10:53:37 +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 4Cl2CP253yz4vQl; Mon, 30 Nov 2020 10:53:37 +0000 (UTC) (envelope-from rene@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1606733617; 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=sQS8MqfC18KT9fiBrhYBa+6hapwy4D48TYL2V/j7Y2Q=; b=M1um4QT9a0tddsiqIvBpP/Z1vS39/gC9Lmz5Vhy3duCVIbRO4fytvwYZnOc1jTa82AVKUO Bbw8sp2Zs7UV0YouwA/8FjGdNnwc3lcWrmVDWgoZhsmxn9ho2BQSvn3UA4W7EBCNHjhwJq /pdzoNsDVxj7qBWpwdst7TXH/HIcA9ehs20BQZZi6NlJeIZrkqcsCfy+SseZRMCjgE5lIL pctCHpUREYSNCwQQSY6vcHNLX3POgEGMtPuxFXn1dw1ILF6fftMXfh1pZaru9Otdw75AYV WZHg6e3FknKXmmiCbg0n3gjWVs7XO5WjfpgD5Fp1ETVWB249/9xbGbKhIqYEiA== Received: by freefall.freebsd.org (Postfix, from userid 1185) id 39C8E15AB9; Mon, 30 Nov 2020 10:53:37 +0000 (UTC) Date: Mon, 30 Nov 2020 10:53:37 +0000 From: Rene Ladan To: Chris Rees Cc: Adam Weinberger , git@freebsd.org, "portmgr@FreeBSD.org" Subject: Re: converting rmport to git Message-ID: <20201130105337.GA42359@freefall.freebsd.org> References: <20201129164707.GA31739@freefall.freebsd.org> <14871125-A032-4980-8DB1-0210E34D5A11@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <14871125-A032-4980-8DB1-0210E34D5A11@FreeBSD.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1606733617; 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=sQS8MqfC18KT9fiBrhYBa+6hapwy4D48TYL2V/j7Y2Q=; b=YhJLkdFu0fnv9u+VyFvqcJwSpUENI9ng8Sdpz+aKDvJ+kIhtfJnPXHL8XjTpXaJle5WsrR V0C/WetOucsPRH5+jcr8ChcT047wU+p2f93wThoDgQE6K6hvCg7mCMwch1gR4zNT/YqqId LlLXafQPvRH71mee21ri1bOmdWeun6JblmqXrdflscFuh/K6bRMB6M/wmVjdZJOBujnG2x uq7OHh9B1A9NxilHpcLH/7tdFR6A7NPI4Gi8/YbK3fpK1lsc1hAnDtsXpmCnqAyrjv+19c KTlGugTMb4X7fF7FHxJo2omJFc7CZH354FjRda6uFzJ0lBeU8izbU9On90sFkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1606733617; a=rsa-sha256; cv=none; b=SVvvT43nKckYVr6OJ1UPxFsIDAdaDOkSmQ7qjkAAtM6GSnBkaV1QjskFz7HOPAl3Yje5lo 0qr7XdyI8pozy/wyZWyLP/fqT49e/wUaXh/Osx9CjKZ+2pdTKiaZ4CJiSEofso+Cc7vM8x ZXBYbIhuoJaYSqYMA8hNSDQ8CrWVdb5N2G5fx2TwN6/hZW6yBabeUDGVbYVzEpdcVuLHjS MGON8VoCAeGczCn2/GoXgAiok8MaSpN89XRHbDJdaiK87CP8ODOIkCAUjlFpqmxAZMRlNn bKmZFOSpOVeEwoX/8OPw0P/ebVRpDPtN7WrB7siNdPUXsmcuMVGqzMhr5ZfdrQ== 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: Mon, 30 Nov 2020 10:53:37 -0000 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? Regards, René