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

[PATCH 0/3] some transport-helper "option object-format" confusion

From
Jeff King <peff@peff.net>
Date
Mar 20, 2024, 09:32 UTC
Message-ID
<20240320093226.GA2445531@coredump.intra.peff.net>
In-Reply-To
<20240307084735.GA2072130@coredump.intra.peff.net>
On Thu, Mar 07, 2024 at 03:47:35AM -0500, Jeff King wrote:
Show 12 quoted lines
> I happened to be looking at the output of t5801 for an unrelated
> problem, and I noticed our git-remote-testgit spewing a bunch of shell
> errors. It turns out that its expectations do not quite match what the
> transport-helper code produces.
> 
> This series brings the test and documentation in line with how the
> transport-helper code behaves. But I'm not sure if we should be going
> the other way (see the comments on patch 2 especially), and bringing the
> transport-helper code in line with the others. Hence the RFC.
> 
>   [1/2]: t5801: fix object-format handling in git-remote-testgit
>   [2/2]: doc/gitremote-helpers: match object-format option docs to code

Here's a non-RFC v2 based on the discussion thus far (thanks brian and Eric).

The big change is that instead of changing the docs to match true-less "option object-format", the code is changed to match the docs. That happens in patch 3 (which subsumes the original patch 1). We continue to drop the documentation for the "option object-format sha256" form. But now the commit message justifies it better, and we clean up the stale code in remote-curl.c.

Patch 1 is a small fix for debugging output that I noticed after getting confused. :-/ It's not strictly related and could be taken separately.

Eric mentioned having Git check that the helpers never say ":object-format" unless it was negotiated. I stopped short of that. One, it's a bit tricky to test (since Git will always ask for object-format, you have to teach remote-testgit to optionally send broken output). And two, I'm not sure that being strict has much value here. It keeps remote helpers honest, but the real losers are old versions that do not understand :object-format, which would fail against such a remote. So I dunno. It isn't any harder to do it on top later if we want to.

  [1/3]: transport-helper: use write helpers more consistently
  [2/3]: transport-helper: drop "object-format <algo>" option
  [3/3]: transport-helper: send "true" value for object-format option
 Documentation/gitremote-helpers.txt |  7 ++-----
 remote-curl.c                       |  9 ++-------
 t/t5801/git-remote-testgit          |  4 +++-
 transport-helper.c                  | 11 ++++-------
 4 files changed, 11 insertions(+), 20 deletions(-)
-Peff
Previous: brian m. carlsonNext: Jeff King
Message 15 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.