Re: [PATCH 3/3] connect: Add support for per-remote and per-namespace SSH options
- From
Wesley <wesleys@opperschaap.net>
- Date
- Mar 28, 2026, 02:25 UTC
- Message-ID
- <c5ad8e2e-c361-4f75-b557-2e7dc119ac01@opperschaap.net>
- In-Reply-To
- <20260328020327.GB621762@coredump.intra.peff.net>
On 3/27/26 22:03, Jeff King wrote:
> On Fri, Mar 27, 2026 at 08:43:07PM -0400, Wesley wrote: >
igured in one local repo, then yes, it will always apply the config.
Show 10 quoted lines
> > If you really want per-connection config, I'm still not quite convinced > that you aren't better off defining host sections in your ssh config. > That covers all options that ssh knows about (not just ones we teach Git > about), and you can still apply it automatically from ~/.gitconfig using > insteadOf. Something like: > > git config --global foo.example.com:foo/.insteadOf example.com:foo/ > > and then defining a foo.example.com block in your ~/.ssh/config.
This is where it breaks in my mind. I'm configuring ssh to configure git.
Btw, I'm assuming you meant:
git config --global url.foo.example.com:foo/.insteadOf example.com:foo/
I never took this approach with ssh identity files. I'll have a look at this approach see how it works. The submitted patch approach has served me over a number of years, albeit not directly in C. I just store the config in git and I don't need to worry about ssh anymore.
Cheers, Wesley
-- Wesley Why not both?