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

Re: [PATCH 2/2] doc/gitremote-helpers: match object-format option docs to code

From
EBEric W. Biederman <ebiederm@gmail.com>
Date
Mar 15, 2024, 15:41 UTC
Message-ID
<87msqzo63f.fsf@gmail.froward.int.ebiederm.org>
In-Reply-To
<ZfNqVowQBy47_92m@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 8 quoted lines
> On 2024-03-14 at 12:47:16, Eric W. Biederman wrote:
>> That said I think a lot of think we do a lot of that today in practice
>> by simply detecting the length of the hash.
>
> That's only true for the dumb HTTP protocol.  Everything else should not
> do that and we specifically want to avoid doing that, since we may very
> well end up with SHA-3-256 or another 256-bit hash instead of SHA-256 if
> there are sufficient cryptographic advances.

My apologies. I thought Jeff King was reporting that object-format extension did not work, and that had been masked by a test.

I see you saying and a quick grep through the code supports that the object-format extension is implemented, and that the primary problem is that the Documentation varies slightly from what is implemented.

Looking at the code I am left with the question:
 Is the object-format extension properly implemented in all cases?

If the object-format extension is properly implemented such that a client and server mismatch can be detected I am for just Documenting what is currently implemented and calling it good.

The reason for that is Documentation/technical/hash-function-transition.txt does not expect servers to support more than hash function. I don't have a perspective that differs. So detecting what the client and server support and failing if they differ should be good enough.

I am concerned that the current code may not report it's hash function in all of the cases it needs to, to be able to detect a mismatch.

I look at commit 8b85ee4f47aa ("transport-helper: implement object-format extensions") and I don't see anything that generates ":object-format=" after it has been asked for except the code in remote-curl.c added in commit 7f60501775b2 ("remote-curl: implement object-format extensions").

Maybe I am mistaken but a name like remote-curl has me strongly suspecting that it does not cover all of the cases that git supports that implement protocol v2.

I think I see some omissions in updating the protocol v2 Documentation.

Can some folks who understand how git protocol v2 is implemented better that I do, tell me if I am seeing things or if it indeed looks like there are some omissions in the object-format implementation?

Eric
Previous: brian m. carlsonNext: Jeff King
Message 9 of 21 in “some transport-helper "option object-format" confusion”
  1. 0/2 some transport-helper "option object-format" confusionJeff King, Mar 7, 2024
  2. 1/2 t5801: fix object-format handling in git-remote-testgitJeff King, Mar 7, 2024
  3. 2/2 doc/gitremote-helpers: match object-format option docs to codeJeff King, Mar 7, 2024
  4. brian m. carlsonMar 7, 2024
  5. Jeff KingMar 12, 2024
  6. brian m. carlsonMar 13, 2024
  7. Eric W. BiedermanMar 14, 2024
  8. brian m. carlsonMar 14, 2024
  9. Eric W. BiedermanMar 15, 2024
  10. Jeff KingMar 16, 2024
  11. Eric W. BiedermanMar 17, 2024
  12. Jeff KingMar 18, 2024
  13. Junio C HamanoMar 14, 2024
  14. brian m. carlsonMar 14, 2024
  15. 0/3 some transport-helper "option object-format" confusionJeff King, Mar 20, 2024
  16. 1/3 transport-helper: use write helpers more consistentlyJeff King, Mar 20, 2024
  17. 2/3 transport-helper: drop "object-format <algo>" optionJeff King, Mar 20, 2024
  18. 3/3 transport-helper: send "true" value for object-format optionJeff King, Mar 20, 2024
  19. Junio C HamanoMar 20, 2024
  20. Eric W. BiedermanMar 20, 2024
  21. Jeff KingMar 27, 2024

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.