commit a80e9be6e42403bde1c2d25c8e255450a6efc98e from: Stefan Sperling via: Thomas Adam date: Thu Apr 25 14:57:52 2024 UTC make 'got fetch' work with URLs which refer to $HOME via a tilde ~ 'got clone' already happens to support such URLs via scp-style syntax: user@127.0.0.1:~/test.git While the clone operation succeded, subsequent fetch operations would raise an error: '/~/test.git' does not appear to be a git repository Make such URLs work when they are read back from got.conf, and also on the clone command line in canonical form: ssh://user@127.0.0.1/~/test.git Not adding a test case because I don't see an easy way to add test coverage for this without spilling test data into home directories or modifying ~/.ssh/ssh_config. Problem found by Jesper Wallin. commit - 3468ff0e6f0b09a4807c325d738f6ef3061ea104 commit + a80e9be6e42403bde1c2d25c8e255450a6efc98e blob - bcc0749bd0033076b6eb207ad5e08e9b459e3f56 blob + 68a1191b69882f53d67b5755a96af288e92a7c16 --- lib/dial.c +++ lib/dial.c @@ -185,7 +185,7 @@ got_dial_parse_uri(char **proto, char **host, char **p } } - while (p[0] == '/' && p[1] == '/') + while (p[0] == '/' && (p[1] == '/' || p[1] == '~')) p++; *server_path = strdup(p); if (*server_path == NULL) {