Blame


1 c8846eb9 2020-10-12 neels --- test116.left-P.txt
2 c8846eb9 2020-10-12 neels +++ test116.right-P.txt
3 c8846eb9 2020-10-12 neels @@ -254,7 +254,7 @@
4 c8846eb9 2020-10-12 neels const char *uri, *dirname;
5 c8846eb9 2020-10-12 neels char *proto, *host, *port, *repo_name, *server_path;
6 c8846eb9 2020-10-12 neels char *default_destdir = NULL, *id_str = NULL;
7 c8846eb9 2020-10-12 neels - const char *repo_path;
8 c8846eb9 2020-10-12 neels + const char *repo_path, *remote_repo_path;
9 c8846eb9 2020-10-12 neels struct got_repository *repo = NULL;
10 c8846eb9 2020-10-12 neels struct got_pathlist_head refs, symrefs, wanted_branches, wanted_refs;
11 c8846eb9 2020-10-12 neels struct got_pathlist_entry *pe;
12 c8846eb9 2020-10-12 neels @@ -275,6 +275,9 @@
13 c8846eb9 2020-10-12 neels goto done;
14 c8846eb9 2020-10-12 neels }
15 c8846eb9 2020-10-12 neels got_path_strip_trailing_slashes(server_path);
16 c8846eb9 2020-10-12 neels + remote_repo_path = server_path;
17 c8846eb9 2020-10-12 neels + while (remote_repo_path[0] == '/')
18 c8846eb9 2020-10-12 neels + remote_repo_path++;
19 c8846eb9 2020-10-12 neels if (asprintf(&gotconfig,
20 c8846eb9 2020-10-12 neels "remote \"%s\" {\n"
21 c8846eb9 2020-10-12 neels "\tserver %s\n"
22 c8846eb9 2020-10-12 neels @@ -285,7 +288,7 @@
23 c8846eb9 2020-10-12 neels "}\n",
24 c8846eb9 2020-10-12 neels GOT_FETCH_DEFAULT_REMOTE_NAME, host, proto,
25 c8846eb9 2020-10-12 neels port ? "\tport " : "", port ? port : "", port ? "\n" : "",
26 c8846eb9 2020-10-12 neels - server_path,
27 c8846eb9 2020-10-12 neels + remote_repo_path,
28 c8846eb9 2020-10-12 neels mirror_references ? "\tmirror-references yes\n" : "") == -1) {
29 c8846eb9 2020-10-12 neels error = got_error_from_errno("asprintf");
30 c8846eb9 2020-10-12 neels goto done;