You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sapling does not handle scp-style git origin path relative to homedir #1480
Then sl tracking of the git config creates a default path in .git/sl/config-git-repo like this:
[paths]
# from git config: remote.origin.url
default = ssh://git.example.org/.git-projects/foo.git
But this URL doesn't work:
$ sl pull
pulling from ssh://git.example.org/.git-projects/foo.git
abort: git command failed with exit code 128
git '--git-dir=/home/marc/foo/.git' ls-remote --refs 'ssh://git.example.org/.git-projects/foo.git' refs/heads/main refs/heads/master
fatal: '/.git-projects/foo.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If I update the remote to use a URL form with a ~, then sl works:
hey! i'd love to work on this issue. i was able to reproduce the incorrect URL translation locally on macOS with Sapling 0.2.20261028.
i've been investigating translate_scp_url_to_ssh() in gitcompat/src/config.rs. It looks like the conversion changes the semantics of home-relative SSH paths.
one possible approach is to preserve the original scp-style URL when passing it to Git, but that would also require updating Sapling's URL recognition and configuration handling. Simply inserting /~/ seems potentially problematic for GitHub-style remotes.
would preserving the original scp-style URL be the preferred direction, or is there a reason Sapling needs to normalize these into ssh:// URLs?
Activity
rafafaruque commentedon Nov 3, 2026
hey! i'd love to work on this issue. i was able to reproduce the incorrect URL translation locally on macOS with Sapling 0.2.20261028.
i've been investigating
translate_scp_url_to_ssh()ingitcompat/src/config.rs. It looks like the conversion changes the semantics of home-relative SSH paths.one possible approach is to preserve the original scp-style URL when passing it to Git, but that would also require updating Sapling's URL recognition and configuration handling. Simply inserting
/~/seems potentially problematic for GitHub-style remotes.would preserving the original scp-style URL be the preferred direction, or is there a reason Sapling needs to normalize these into
ssh://URLs?