xref: /freebsd/contrib/libdiff/test/expect116.diff (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1--- test116.left-P.txt
2+++ test116.right-P.txt
3@@ -254,7 +254,7 @@
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;
12@@ -275,6 +275,9 @@
13 		goto done;
14 	}
15 	got_path_strip_trailing_slashes(server_path);
16+	remote_repo_path = server_path;
17+	while (remote_repo_path[0] == '/')
18+		remote_repo_path++;
19 	if (asprintf(&gotconfig,
20 	    "remote \"%s\" {\n"
21 	    "\tserver %s\n"
22@@ -285,7 +288,7 @@
23 	    "}\n",
24 	    GOT_FETCH_DEFAULT_REMOTE_NAME, host, proto,
25 	    port ? "\tport " : "", port ? port : "", port ? "\n" : "",
26-	    server_path,
27+	    remote_repo_path,
28 	    mirror_references ? "\tmirror-references yes\n" : "") == -1) {
29 		error = got_error_from_errno("asprintf");
30 		goto done;
31