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