Re: [PATCH 1/5] http-protocol.txt: document SHA-256 "want"/"have" format
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 14, 2020, 20:47 UTC
- Message-ID
- <xmqqft8puf8d.fsf@gitster.c.googlers.com>
- In-Reply-To
- <xmqqo8ndufli.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 19 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> writes: > >> On 2020-08-14 at 17:28:27, Junio C Hamano wrote: >>> Martin Ågren <martin.agren@gmail.com> writes: >>> >>> > Document that in SHA-1 repositories, we use SHA-1 for "want"s and >>> > "have"s, and in SHA-256 repositories, we use SHA-256. >>> >>> Ehh, doesn't this directly contradict the transition plan of "on the >>> wire everything will use SHA-1 version for now?" >> >> SHA-256 repositories interoperate currently using SHA-256 object IDs. >> It was originally intended that we wouldn't update the protocol, but >> that leads to much of the testsuite failing since it's impossible to >> move objects from one place to another. >> >> If we wanted to be more pedantically correct and optimize for the >> future, we could say that the values use the format negotiated by the >> "object-format" protocol extension and SHA-1 otherwise.
Yes, that's wonderful. I was confused when I said about the evolution path. We still would want to eventually do the on-the-fly migration over the wire to make SHA-1 and SHA-256 repositories interoperate, but at least we already can allow SHA-256 repositories safely attempt to talk to SHA-1 repositories and gracefully fail.
Thanks.