Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 May 2025 20:50:46 -0500
From:      Kyle Evans <kevans@FreeBSD.org>
To:        freebsd-git@FreeBSD.org
Subject:   got(1) in base consideration
Message-ID:  <9f48a955-5f8a-450c-94c1-2a7d9d69ecb9@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

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?

Thanks,

Kyle Evans



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f48a955-5f8a-450c-94c1-2a7d9d69ecb9>