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

Re: [PATCH 3/5] protocol-capabilities.txt: clarify "allow-x-sha1-in-want" re SHA-256

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Aug 14, 2020, 20:35 UTC
Message-ID
<CAN0heSpv5L67hYSX44LkwQ1pJ+_px_W=FQ4piXKS1anpMi0n2w@mail.gmail.com>
In-Reply-To
<xmqqft8pxhd9.fsf@gitster.c.googlers.com>
On Fri, 14 Aug 2020 at 19:33, Junio C Hamano <gitster@pobox.com> wrote:
Show 34 quoted lines
>
> Martin Ågren <martin.agren@gmail.com> writes:
>
> > Two of our extensions contain "sha1" in their names, but that's
> > historical. The "want"s will take object names that are not necessarily
> > SHA-1s. Make this clear, but also make it clear how there's still just
> > one correct hash algo: These extensions don't somehow make the "want"s
> > take object names derived using *any* hash algorithm.
> >
> > Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> > ---
> >  Documentation/technical/protocol-capabilities.txt | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
> > index 36ccd14f97..47f1b30090 100644
> > --- a/Documentation/technical/protocol-capabilities.txt
> > +++ b/Documentation/technical/protocol-capabilities.txt
> > @@ -324,15 +324,18 @@ allow-tip-sha1-in-want
> >  ----------------------
> >
> >  If the upload-pack server advertises this capability, fetch-pack may
> > -send "want" lines with SHA-1s that exist at the server but are not
> > -advertised by upload-pack.
> > +send "want" lines with object names that exist at the server but are not
> > +advertised by upload-pack. (Note that the name of the capability
> > +contains "sha1", but that it's more general than that: in SHA-1
> > +repositories, the "want" lines provide SHA-1 values, but in SHA-256
> > +repositories, they provide SHA-256 values.)
>
> I think we should have either a new sha256 capability or a more
> generic hash-algo capability whose value can be set to sha256.
> Neither the connection initiators or the acceptors should talk
> in sha256 until both ends agreed to do so.

I think we should, and I think we do. I haven't dug into the details, but "object-format" looks like it's just that.

Maybe instead of SHA-1 and SHA-256, this should talk about "whatever has been negotiated through 'object-format', or SHA-1", similar to brian's suggestion elsewhere.

> I do not think of any other way to make sure hosting sites to serve
> projects that migrate at different pace.  Per project, you might be
> able to have a flag day.  You cannot have a flag day that spans the
> world.
Yeah, that makes sense.
Martin
Previous: Junio C HamanoNext: Junio C Hamano
Message 22 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.