Commit Diff
- Commit:
a80e9be6e42403bde1c2d25c8e255450a6efc98e
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
- Message:
- 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.
- Actions:
- Patch | Tree
--- 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) {