Subject: Re: [PATCH v5 7/9] BreakingChanges: announce Rust becoming mandatory

From: Junio C Hamano <[email-masked]>
Date: Mon, 22 Sep 2025 13:59:00 -0700

SZEDER Gábor <[email-masked]> writes:

> On Thu, Sep 18, 2025 at 01:19:19AM +0000, brian m. carlson wrote:
>> On 2025-09-17 at 22:09:10, SZEDER Gábor wrote:
>> > Providing an LTS release for those platforms that can't jump on the
>> > Rust bandwagon is great, but...
>> > 
>> > Git 3.0 will switch the default hash algorithm for newly initialized
>> > repositories to SHA-256, which, presumably, will also encourage SHA-1
>> > -> SHA-256 migrations in existing repositories.  Alas, it appears that
>> > the SHA-1/SHA-256 interop feature will only be available in Rust.
>> > 
>> > How will this affect those platforms without Rust?  What will and
>> > won't work on such platforms?
>> 
>> On Git 3.0, nothing will work without Rust because it will be mandatory.
>
> Well, "What will and won't work with respect to hash transition" was
> what I meant but, alas, didn't convey.

But "here is a topic to consolidate everything we talked about
starting to use Rust" Ezekiel works on incorporates the "dip our
toes in water rewrite of varint.c into Rust" Patrick started and
"Rust will become mandatory" policy document written by brian [*].
At 3.0, the WITH_BREAKING_CHANGES conditional compilation option is
removed and the conditional code paths protected by that macro
becomes unconditional.  When that happens, you won't have a git
binary from the source for that version of Git at all, unless you
can turn varint.rs into varint.o (which typically is done by
compiling the source with Rust toolchain).

So I would think "nothing will work" is a very fair assessment of
the consequence of that policy.  And the answer would be the same
for "with respect to hash transition" question, I would think.

The version of the document in this thread talks about 2.52 (opt-in)
and 2.53 (opt-out) before jumping to 3.0 (no way to opt-out) but it
does not say anything about how far out that big version bump is.
But the numbers I remember hearing was in the orders of 18 monts or
so if I am not mistaken?

As I already said a few times (e.g. <[email-masked]>), I
feel that the timeline hinted by any of these documents that were
proposed is way too aggressive for affected people to practically
prepare for.

By the way, I was hoping that the hash compatibility work can be
done as an opt-in item available only for those with Rust, while
Rustless folks are forever stuck in a single hash algorithm world,
and be released well before Git 3.0 that makes Rust mandatory.  That
does not change the fact that nothing will work wrt hash transition
for Rustless folks, though ;-).

[Footnote]

* By the way, I _think_ I never saw that policy document until
  Ezekiel started his topic and sent it out as one of the component
  patches; how did it get there from brian to Ezekiel's topic?