4 const char *uri, *dirname;
5 char *proto, *host, *port, *repo_name, *server_path;
6 char *default_destdir = NULL, *id_str = NULL;
7 - const char *repo_path;
8 + const char *repo_path, *remote_repo_path;
9 struct got_repository *repo = NULL;
10 struct got_pathlist_head refs, symrefs, wanted_branches, wanted_refs;
11 struct got_pathlist_entry *pe;
15 got_path_strip_trailing_slashes(server_path);
16 + remote_repo_path = server_path;
17 + while (remote_repo_path[0] == '/')
19 if (asprintf(&gotconfig,
24 GOT_FETCH_DEFAULT_REMOTE_NAME, host, proto,
25 port ? "\tport " : "", port ? port : "", port ? "\n" : "",
28 mirror_references ? "\tmirror-references yes\n" : "") == -1) {
29 error = got_error_from_errno("asprintf");