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

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

From
Jeff King <peff@peff.net>
Date
Mar 7, 2024, 08:56 UTC
Message-ID
<20240307085632.GB2072294@coredump.intra.peff.net>
In-Reply-To
<20240307084735.GA2072130@coredump.intra.peff.net>

Git's transport-helper code has always sent "option object-format\n", and never provided the "true" or "algorithm" arguments. While the "algorithm" request is something we might need or want to eventually support, it probably makes sense for now to document the actual behavior, especially as it has been in place for several years, since 8b85ee4f47 (transport-helper: implement object-format extensions, 2020-05-25).

Signed-off-by: Jeff King <peff@peff.net>
---
As I discussed in patch 1, remote-curl does handle the "true" thing
correctly. And that's really the helper that matters in practice (it's
possible some third party helper is looking for the explicit "true", but
presumably they'd have reported their confusion to the list). So we
could probably just start tacking on the "true" in transport-helper.c
and leave that part of the documentation untouched.

I'm less sure of the specific-algorithm thing, just because it seems like remote-curl would never make use of it anyway (preferring instead to match whatever algorithm is used by the http remote). But maybe there are pending interoperability plans that depend on this?

I guess it would not hurt to leave it in place even if transport-helper never produces it. On the other hand, any helper which advertises the "object-format" capability is supposed to support it, and without the transport-helper side being implemented, I don't know how any helper program can claim that.

 Documentation/gitremote-helpers.txt | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt
index 07c8439a6f..12dffbf383 100644
--- a/Documentation/gitremote-helpers.txt
+++ b/Documentation/gitremote-helpers.txt
@@ -542,13 +542,10 @@ set by Git if the remote helper has the 'option' capability.
 	transaction.  If successful, all refs will be updated, or none will.  If the
 	remote side does not support this capability, the push will fail.
 
-'option object-format' {'true'|algorithm}::
-	If 'true', indicate that the caller wants hash algorithm information
+'option object-format'::
+	Indicate that the caller wants hash algorithm information
 	to be passed back from the remote.  This mode is used when fetching
 	refs.
-+
-If set to an algorithm, indicate that the caller wants to interact with
-the remote side using that algorithm.
 
 SEE ALSO
 --------
-- 
2.44.0.463.g71abcb3a9f
Previous: Jeff KingNext: brian m. carlson
Message 3 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.