git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] http-protocol.txt: document SHA-256 "want"/"have" format

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2020, 17:28 UTC
Message-ID
<xmqqk0y1xhl0.fsf@gitster.c.googlers.com>
In-Reply-To
<5590a68c5ba7081cd7e64c708b5c25db23f5e95b.1597406877.git.martin.agren@gmail.com>
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?"

Show 21 quoted lines
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
>  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.
Previous: Martin ÅgrenNext: brian m. carlson
Message 12 of 35 in “Documentation updates for SHA-256”
  1. 0/2 Documentation updates for SHA-256brian m. carlson, Aug 13, 2020
  2. 1/2 docs: document SHA-256 pack and indicesbrian m. carlson, Aug 13, 2020
  3. Derrick StoleeAug 14, 2020
  4. 2/2 docs: fix step in transition planbrian m. carlson, Aug 13, 2020
  5. Martin ÅgrenAug 14, 2020
  6. Derrick StoleeAug 14, 2020
  7. Junio C HamanoAug 14, 2020
  8. brian m. carlsonAug 14, 2020
  9. Junio C HamanoAug 14, 2020
  10. 0/5 more SHA-256 documentationMartin Ågren, Aug 14, 2020
  11. 1/5 http-protocol.txt: document SHA-256 "want"/"have" formatMartin Ågren, Aug 14, 2020
  12. Junio C HamanoAug 14, 2020
  13. brian m. carlsonAug 14, 2020
  14. Martin ÅgrenAug 14, 2020
  15. Junio C HamanoAug 14, 2020
  16. Junio C HamanoAug 14, 2020
  17. 4/5 shallow.txt: document SHA-256 shallow formatMartin Ågren, Aug 14, 2020
  18. 3/5 protocol-capabilities.txt: clarify "allow-x-sha1-in-want" re SHA-256Martin Ågren, Aug 14, 2020
  19. Derrick StoleeAug 14, 2020
  20. Martin ÅgrenAug 14, 2020
  21. Junio C HamanoAug 14, 2020
  22. Martin ÅgrenAug 14, 2020
  23. Junio C HamanoAug 14, 2020
  24. 5/5 commit-graph-format.txt: fix "Hash Version" descriptionMartin Ågren, Aug 14, 2020
  25. Derrick StoleeAug 14, 2020
  26. Martin ÅgrenAug 14, 2020
  27. 2/5 index-format.txt: document SHA-256 index formatMartin Ågren, Aug 14, 2020
  28. Derrick StoleeAug 14, 2020
  29. Martin ÅgrenAug 14, 2020
  30. brian m. carlsonAug 14, 2020
  31. 0/4 more SHA-256 documentationMartin Ågren, Aug 15, 2020
  32. 2/4 index-format.txt: document SHA-256 index formatMartin Ågren, Aug 15, 2020
  33. 3/4 protocol-capabilities.txt: clarify "allow-x-sha1-in-want" re SHA-256Martin Ågren, Aug 15, 2020
  34. 4/4 shallow.txt: document SHA-256 shallow formatMartin Ågren, Aug 15, 2020
  35. 1/4 http-protocol.txt: document SHA-256 "want"/"have" formatMartin Ågren, Aug 15, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.