Blame


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