From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, Scott Chacon <schacon@gmail.com>
Subject: Re: a "limbo" object-format state for empty repositories?
Date: Sun, 4 Oct 2026 23:30:23 -0400 [thread overview]
Message-ID: <20261005033023.GA10271@coredump.intra.peff.net> (raw)
In-Reply-To: <asEPp6Bg3xDpA4e1@fruit.crustytoothpaste.net>
On Sat, Oct 03, 2026 at 02:22:32PM +0000, brian m. carlson wrote:
> > So I think the best we can do is advertise magic-limbo, and then new
> > limbo-aware clients can always do the right thing. Clients which are new
> > enough to understand object-format but don't understand limbo will use
> > the server's object-format unconditionally. So the choice there does
> > still matter. But if we don't switch to sha256-by-default until
> > magic-limbo is implemented, then anybody who has a local sha256 repo got
> > there intentionally, and presumably knows enough to configure the server
> > side to match. So the sensible protocol advertisement for a limbo repo
> > is "magic-limbo" plus "object-format=sha1".
>
> We need to declare the other object format as well because we need to
> know that the server specifically supports SHA-256. If we add a third
> hash algorithm, then maybe SHA-256 is unacceptable for that reason. So
> maybe `alt-object-format=sha256`. We do definitely need to be sure that
> multiple options are accepted, though.
Right, that makes sense. And the presence of alt-object-format would
replace the need for a separate magic-limbo at all.
> As I say below, we probably need to initialize with some hash algorithm
> at first, so we could also have `object-format=sha256` and
> `alt-object-format=sha1`.
Yeah, that makes sense.
> You hint at delaying SHA-256-by-default until this is implemented, but I
> don't think that's a good idea.
I wasn't proposing a delay. There's at least another whole release cycle
before 3.0, and this feature doesn't seem all that big. So it seemed
like something that could be implemented in that time-frame. I may or may
not work on it at some point; I just don't want to preclude anybody
(like Scott) who is interested and wanted to run with it.
> > Those parts seem outside of the scope of Git, or at least its protocol.
> > But yeah, I'd expect a forge like GitHub to let you say "do not allow
> > the creation of sha1 repos in this account/org", and the object-format
> > selector for a new repo (at the forge UI) should be a tri-state: sha1,
> > sha256, or limbo. How that translates into Git commands is TBD: whether
> > via config, or more likely, that you have to select the limbo state
> > explicitly with a command-line option to git-init.
>
> I disagree that they're outside the scope of Git, but I do agree that we
> should add support for this either in the config or via a command-line
> option. I think config would be better here because we also have to
> deal with the fact that someone might use commands other than push to
> write into the repository (on a forge, that might be the API) and we
> need to specify _some_ hash algorithm for that case.
Sorry, I just meant that policy decisions like "this account should not
be able to create sha1 repos" was outside of Git. We definitely need
some config flag to mark the limbo state (since it's set by "git init"
and ultimately respected by receive-pack and elsewhere). I would say
that any limbo-state feature should _not_ be on by default, but could be
a useful building block for forges that want to reduce friction. There'd
perhaps be some forge-specific work to do on top, too.
-Peff
next prev parent reply other threads:[~2026-10-05 3:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 22:44 a "limbo" object-format state for empty repositories? Jeff King
2026-10-03 1:07 ` brian m. carlson
2026-10-03 1:25 ` Jeff King
2026-10-03 14:22 ` brian m. carlson
2026-10-05 3:30 ` Jeff King [this message]
2026-10-03 1:31 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261005033023.GA10271@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=schacon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox