From: Junio C Hamano Date: Fri, 14 Aug 2020 17:28:27 GMT Subject: Re: [PATCH 1/5] http-protocol.txt: document SHA-256 "want"/"have" format Message-ID: In-Reply-To: <5590a68c5ba7081cd7e64c708b5c25db23f5e95b.1597406877.git.martin.agren@gmail.com> Martin Ågren 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?" > Signed-off-by: Martin Ågren > --- > Documentation/technical/http-protocol.txt | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/Documentation/technical/http-protocol.txt b/Documentation/technical/http-protocol.txt > index 51a79e63de..507f28f9b3 100644 > --- a/Documentation/technical/http-protocol.txt > +++ b/Documentation/technical/http-protocol.txt > @@ -401,8 +401,9 @@ at all in the request stream: > The stream is terminated by a pkt-line flush (`0000`). > > A single "want" or "have" command MUST have one hex formatted > -SHA-1 as its value. Multiple SHA-1s MUST be sent by sending > -multiple commands. > +object name as its value. Multiple object names MUST be sent by sending > +multiple commands. (An object name is a SHA-1 hash in a SHA-1 repo > +and a SHA-256 hash in a SHA-256 repo.) > > The `have` list is created by popping the first 32 commits > from `c_pending`. Less can be supplied if `c_pending` empties.