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

Re: [PATCH 2/3] connect: Add transport->remote->name to git_connect()

From
Jeff King <peff@peff.net>
Date
Mar 27, 2026, 21:39 UTC
Message-ID
<20260327213954.GB598533@coredump.intra.peff.net>
In-Reply-To
<20260326233739.2911354-3-wesleys@opperschaap.net>
On Thu, Mar 26, 2026 at 07:37:37PM -0400, Wesley Schwengle wrote:
> To support `remote.$name.sshIdentityFile', and `remote.$name.sshOpts' for
> connecting to various remotes I need to pass around the remote down to
> git_connect. This commit introduces the `remote_name' and sprinkles all
> call sites to pass `NULL'. This is a non-breaking forward change

My gut feeling is here is that this is going to be the wrong level for reading config, because it's too low and too coarse. If we ever want to have a command-line option for overriding config, like "git fetch --ssh-identity-file=foo", then how can the higher level git-fetch code pass down that single item?

I.e., I think the ideal form of this would be that we pass around an ssh_options_context struct, high-level commands fill in that struct based on command-line options or config (including remote-specific ones), and then we act on it at the lowest level when spawning ssh.

All that said, my first thought here is that most of what this series does is already possible with ssh config. It looks like that has already been suggested elsewhere in the thread, so I'll go read that before commenting further.

-Peff
Previous: Wesley SchwengleNext: Wesley Schwengle
Message 8 of 24 in “Add support for per-remote and per-namespace SSH options”
  1. 0/3 Add support for per-remote and per-namespace SSH optionsWesley Schwengle, Mar 26, 2026
  2. 1/3 connect: Rename name to command in connect_git()Wesley Schwengle, Mar 26, 2026
  3. Jeff KingMar 27, 2026
  4. WesleyMar 28, 2026
  5. Jeff KingMar 28, 2026
  6. WesleyMar 28, 2026
  7. 2/3 connect: Add transport->remote->name to git_connect()Wesley Schwengle, Mar 26, 2026
  8. Jeff KingMar 27, 2026
  9. 3/3 connect: Add support for per-remote and per-namespace SSH optionsWesley Schwengle, Mar 26, 2026
  10. Jeff KingMar 27, 2026
  11. WesleyMar 28, 2026
  12. Jeff KingMar 28, 2026
  13. WesleyMar 28, 2026
  14. Johannes SixtMar 27, 2026
  15. WesleyMar 27, 2026
  16. Junio C HamanoMar 27, 2026
  17. WesleyMar 27, 2026
  18. brian m. carlsonMar 27, 2026
  19. WesleyMar 28, 2026
  20. Johannes SixtMar 28, 2026
  21. WesleyMar 28, 2026
  22. Ben KnobleMar 29, 2026
  23. brian m. carlsonMar 27, 2026
  24. Junio C HamanoMar 27, 2026

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.