From nobody Mon May 5 08:58:34 2025 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zrb6d4MTZz5vB32 for ; Mon, 05 May 2025 08:58:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrb6c4d8sz44px; Mon, 05 May 2025 08:58:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5458wYKo027038; Mon, 5 May 2025 11:58:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5458wYKo027038 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5458wY5t027037; Mon, 5 May 2025 11:58:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 May 2025 11:58:34 +0300 From: Konstantin Belousov To: Kyle Evans Cc: freebsd-git@freebsd.org Subject: Re: got(1) in base consideration Message-ID: References: <9f48a955-5f8a-450c-94c1-2a7d9d69ecb9@FreeBSD.org> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f48a955-5f8a-450c-94c1-2a7d9d69ecb9@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4Zrb6c4d8sz44px X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Spamd-Bar: ---- On Sun, May 04, 2025 at 08:50:46PM -0500, Kyle Evans wrote: > Hi, > > I've been toying around with the idea of pulling got(1) into base, but > hidden off into /usr/libexec and not supporting it for general usage. The > idea would instead be to provide a script or two as a user-facing interface > to do the bare minimum to functionally maintain a local copy of our git > repos. > > However, I've run into some logistics issues that I wanted to throw out for > some opinions. The main issue I've run into is that while got's repository > layout is binary-compatible with git, it won't setup worktrees the same way. > Additionally, it really doesn't like the traditional organization of a git > clone, where you'd have your .git directory inside of your primary worktree > (e.g., /usr/src and /usr/src/.git). > > I don't think this is really a deal-breaker, my proposal to start with would > be that we clone the repositories off into /var/db/got/$repo or some such > and setup the worktrees in the traditional place. git can `worktree add` > from these repos successfully, so one could setup a git-compatible worktree > at least without having to re-clone the entire repository, but that brings > me to the second caveat noted in the paragraph above: the worktree format > isn't compatible. > > We could write a script that'll bridge the gap, but AFAICT that means that > we'd effectively have to just blow away the existing got worktree at > /usr/src and recreate it, with sensible guardrails in place to try and avoid > losing any uncommitted work. That's sort of ugly and I don't really know > how to feel about it, thus this e-mail. > > Thoughts? What is the intended audience of the setup? Who would not install normal git port but still want /usr/src populated? For what purpose?