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

Re: [PATCH 3/3] transport-helper: send "true" value for object-format option

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2024, 17:23 UTC
Message-ID
<xmqq1q84hl6d.fsf@gitster.g>
In-Reply-To
<20240320094103.GC2445682@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
>   - remote-curl, which quietly converts missing values into "true". This
>     goes all the way back to ef08ef9ea0 (remote-helpers: Support custom
>     transport options, 2009-10-30), despite the fact that I don't think
>     any other option has ever made use of it.
Interesting.
Show 10 quoted lines
> When the documentation and code do not match, it is often good to fix
> the documentation rather than break compatibility. And in this case, we
> have had the mis-match since 8b85ee4f47 (transport-helper: implement
> object-format extensions, 2020-05-25). However, the sha256 feature was
> listed as experimental until 8e42eb0e9a (doc: sha256 is no longer
> experimental, 2023-07-31).
> ...
> And doing so has some value: it brings "object-format" in line with the
> syntax of other options, making the protocol more consistent. It also
> lets us use set_helper_option(), which has better error reporting.

I suspect that this may have been an attempt to mimick the value-less true in the configuration syntax, but I agree with the conclusion of this patch. Boolean "true" in the context of the transport options may be fairly common, but unlike configuration files, it is not something we have users write manually, and there is not much point giving a special short form.

Thanks for a pleasant read.  Will queue.
Previous: Jeff KingNext: Eric W. Biederman
Message 19 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.