commit 54b37e986975e273465cf0c0d2f842d371d7f181 from: Stefan Sperling date: Tue Apr 23 21:02:54 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 - b93f334d743a91156b4558df907bd59a0c85cf69 commit + 54b37e986975e273465cf0c0d2f842d371d7f181 blob - b83d4c007e3abf1a415cfc22741bf3c6affb6ffd blob + 98685b4512af8950e460cb50e8dceb741a560e76 --- lib/dial.c +++ lib/dial.c @@ -181,7 +181,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) {