From owner-freebsd-git@freebsd.org Sun Nov 29 16:47:07 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 74C2F4A79A0 for ; Sun, 29 Nov 2020 16:47:07 +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 4CkZ5l2glBz4swZ for ; Sun, 29 Nov 2020 16:47:07 +0000 (UTC) (envelope-from rene@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 5A2084A7A27; Sun, 29 Nov 2020 16:47:07 +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 59E934A77EF for ; Sun, 29 Nov 2020 16:47:07 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 4CkZ5l29gvz4ssy; Sun, 29 Nov 2020 16:47:07 +0000 (UTC) (envelope-from rene@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1606668427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEg5GnH90gKpGGphc0ID0ov29Ss6ZTlkCvXnmyLSkOQ=; b=c5Dcr3WSGsXwJx4sNfn4Qn6YZZnobR0i9bhBEj1RAKy0ERvrUEXvIwX3lIBZetbwlaWDjr jPCKusEE4h54i9rIDD96vsQGF37p77IHZdhvnyVm9uNY80uD4TCXMcksQHxnBOJRIUtv9y L8XJG+8l0FapP1Huo1uq49Zr3MwYS/Fk1TRbOYiRrNhKdzAHItG8LkfifjgWgez0VbPPUz RbKgMnXgS2rtDy9QBhH3WeLZunc5enWuGDgRsVNjaatdIEyiVFaPu1CdoLJPM1Ry/v5rad Z0+YBe3b55GRGQmXeMGjFimcuQjP+HB2Nla7szSF4Le4odmMGe8dcgL9ScJhsA== Received: by freefall.freebsd.org (Postfix, from userid 1185) id 40D74A110; Sun, 29 Nov 2020 16:47:07 +0000 (UTC) Date: Sun, 29 Nov 2020 16:47:07 +0000 From: Rene Ladan To: crees@freebsd.org, git@freebsd.org, portmgr@freebsd.org Subject: converting rmport to git Message-ID: <20201129164707.GA31739@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1606668427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEg5GnH90gKpGGphc0ID0ov29Ss6ZTlkCvXnmyLSkOQ=; b=BVW8vSSZOc42OO8kWGQiIsq623Gg3ZPX7SPbyomYAXk3YXt/NBgL2Mvbgt+9sMPVtvC4si mQyOpMSNPDW+tZbmbHQJhSzLdN5xJc0aBqVW5nHKJuDLKRFqh1vAjViT0qFWbvctzy1s1P /rw5s6jsCqK+28MR9mHyHlXTNNupFi+CLylShhqIi851/zwYPxEwctW3MrrJD7Ne7elP1I oAiQJw49xPXaE0N9qe6uTCIyhchwHL/oYZDSsRW41QIC5Yxl+KqReF0jdwwiZdNuSeA8lZ 8gl0F0uUm57wwZwOlTmE3+M+lvEXa4OyvHS6RdZYEuMNi7wMdroltsS+1pYEFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1606668427; a=rsa-sha256; cv=none; b=nGFxjFfFL44DlL1e22PgREAzj9SDF77i9nYM32ZHMYMH7RpKNexHs73S+IbtHSTEdixiVZ wKKXzRViXcvGdvPo0iIauxlGzgZmUlWvV8vh5LUWgUdgLSaTJay3xvFjEvDMWnKpS6p/d+ Q8yI0bUgI0hTFeJWONsMJ2Yg6C0XMpXMiQRA+LjrBiyWVT0PzNFo0Yn0vq4i6n7hHZO4+Z z+eyZ8F9LsZqzx58M0HkkWqFqMSrIDvLYncQKwfCF4NzwPHgo6ttny3RiHmdX4eGJd1WXf mshltZtsmNrZQHWIBroRGQOgoxUKu0ejFFBXdyTkr5f+Vf5X2frvJWY8j6SRmA== 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: Sun, 29 Nov 2020 16:47:07 -0000 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. 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 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 less cryptic to me. It might also allow for better handling of merge conflicts with MOVED in case that file gets updated by someone else and you are in the middle of a big removal (say Python 2.7). Currently such conflicts crash the script (no work is lost because the temporary checkout is left alone in that case). What do you think? It looks like we can use a similar solution to the addport and perhaps mfh scripts. [1] https://unix.stackexchange.com/questions/233327/is-it-possible-to-clone-only-part-of-a-git-project René