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

Re: [PATCH 3/7] pack-protocol.txt: Mark all LFs in push-cert as required

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2015, 17:30 UTC
Message-ID
<xmqqwpyd19dy.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAD0k6qT8=xQb6MRcLkyvZBm0MRdQ0Z-8ojqghovdgeJQ2EBNEA@mail.gmail.com>
Dave Borowitz <dborowitz@google.com> writes:
> I think I understand the confusion now. I think you and I are working
> from different assumptions about the client behavior.
I agree that we now both understand where we come from ;-)

And sorry for not being clear when I did the "push-cert" originally in the documentation. As I already said, "packets between push-cert and push-cert-end are contents of individual lines of the GPG signed push certificate" was the design meant from day one, and a85b377d (push: the beginning of "git push --signed", 2014-09-12) could have made it clearer.

> The problem with the documentation, then, is that the documentation
> does not say anything to indicate that the signed payload is anything
> other than what is on the wire.

Yeah, that was untold assumption, as I considered "what is on the wire" to include pkt-line framing when I wrote a85b377d (push: the beginning of "git push --signed", 2014-09-12).

Show 5 quoted lines
> So maybe this series should include an explicit description of the
> singed payload outside of the context of a push. Then, in the push
> section, we can describe the set of transformations that the client
> MUST perform (splitting on LF; adding pkt-line headers) and MAY
> perform (adding LFs).

Yes, and the latter is not limited to push-cert but anything sent on pkt-line.

That incidentally is the only point I deeply care about. I just want to minimize "the protocol is this way in general, but only for this one you must do it differently".

One example of "only for this one you must do it differently" is another caveat for protocol implementors for the sending side (again not limited to "push cert").

That existing implementations of the receivers treat an empty packet (i.e. "0004") as if it is the same as a flush packet (i.e. "0000"), so even if the sending side chooses to ignore the "SHOULD terminate each non-flush line using LF", it is strongly advised not to do so when it wants to send an empty payload. This needs to be documented.

The receiving end SHOULD NOT treat "0004" the same way as "0000". I think that must be documented and implementations (including our own) should be fixed.

Thanks.
Previous: Junio C HamanoNext: Dave Borowitz
Message 31 of 50 in “Clarify signed push protocol documentation”
  1. 0/7 Clarify signed push protocol documentationDave Borowitz, Jul 1, 2015
  2. 1/7 pack-protocol.txt: Add warning about protocol inaccuraciesDave Borowitz, Jul 1, 2015
  3. Jonathan NiederJul 1, 2015
  4. Junio C HamanoJul 1, 2015
  5. Dave BorowitzJul 1, 2015
  6. 2/7 pack-protocol.txt: Mark LF in command-list as optionalDave Borowitz, Jul 1, 2015
  7. Stefan BellerJul 1, 2015
  8. Dave BorowitzJul 1, 2015
  9. 3/7 pack-protocol.txt: Mark all LFs in push-cert as requiredDave Borowitz, Jul 1, 2015
  10. Junio C HamanoJul 1, 2015
  11. Dave BorowitzJul 1, 2015
  12. Junio C HamanoJul 1, 2015
  13. Dave BorowitzJul 6, 2015
  14. Dave BorowitzJul 6, 2015
  15. Dave BorowitzJul 6, 2015
  16. Dave BorowitzJul 6, 2015
  17. Dave BorowitzJul 6, 2015
  18. Junio C HamanoJul 6, 2015
  19. Shawn PearceJul 6, 2015
  20. Junio C HamanoJul 6, 2015
  21. Junio C HamanoJul 6, 2015
  22. Dave BorowitzJul 6, 2015
  23. Junio C HamanoJul 6, 2015
  24. Dave BorowitzJul 6, 2015
  25. Dave BorowitzJul 6, 2015
  26. Junio C HamanoJul 6, 2015
  27. Dave BorowitzJul 6, 2015
  28. Junio C HamanoJul 6, 2015
  29. Dave BorowitzJul 6, 2015
  30. Junio C HamanoJul 6, 2015
  31. Junio C HamanoJul 6, 2015
  32. Dave BorowitzJul 6, 2015
  33. Junio C HamanoJul 6, 2015
  34. Junio C HamanoJul 1, 2015
  35. Junio C HamanoJul 1, 2015
  36. Jeff KingJul 2, 2015
  37. Junio C HamanoJul 3, 2015
  38. Jeff KingJul 3, 2015
  39. Shawn PearceJul 3, 2015
  40. Jeff KingJul 3, 2015
  41. 4/7 pack-protocol.txt: Elaborate on pusher identityDave Borowitz, Jul 1, 2015
  42. Junio C HamanoJul 1, 2015
  43. 5/7 pack-protocol.txt: Be more precise about pusher-key relationshipDave Borowitz, Jul 1, 2015
  44. 6/7 pack-protocol.txt: Mark pushee field as optionalDave Borowitz, Jul 1, 2015
  45. Junio C HamanoJul 1, 2015
  46. Dave BorowitzJul 1, 2015
  47. Junio C HamanoJul 1, 2015
  48. Junio C HamanoJul 1, 2015
  49. Dave BorowitzJul 1, 2015
  50. 7/7 send-pack.c: Die if the nonce is emptyDave Borowitz, Jul 1, 2015

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.