~radicle-link/dev

LocalUrl clashes with insteadOf

Details
Message ID
<CAH_DpYSe92WB1A6xfMSn_Us_9PB8qVrTbSSOV0HKXpWGRYw1aQ@mail.gmail.com>
DKIM signature
missing
Download raw message
I set up this config in my `~/.gitconfig`

    [url "ssh://127.0.0.1:9987/rad:git:"]
        insteadOf = "rad://"

This points all `rad://` urls at my local `lnk-gitd` and it works
absolutely fine when I'm in an existing working copy pushing and
pulling.

Unfortunately it breaks `lnk clone`. The reason is that we use
`librad::git::types::Remote<LocalUrl>::fetch` to checkout a copy from the
monorepo. This attempts to connect to a URL of the form `rad://...` and
then I suppose it rewrites it to `ssh://...` but somehow get's confused.
The end result is an "unsupported URL protocol" error.

The most obvious fix for this is to use a different URL scheme for the
anonymous internal remotes that we use to connect to a local transport.
Maybe something like "rad-local". This would require a bit of surgery to
make the remote helper continue to work I think.
Reply to thread Export thread (mbox)