mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 15:22:34 -04:00
git-subtree-dir: contrib/libdiff git-subtree-mainline:f6d489f402git-subtree-split:9eb461aa4bReviewed by: imp Sponsored by: Klara, Inc.
30 lines
981 B
Diff
30 lines
981 B
Diff
--- test016.left.txt
|
|
+++ test016.right.txt
|
|
@@ -254,7 +254,7 @@
|
|
const char *uri, *dirname;
|
|
char *proto, *host, *port, *repo_name, *server_path;
|
|
char *default_destdir = NULL, *id_str = NULL;
|
|
- const char *repo_path;
|
|
+ const char *repo_path, *remote_repo_path;
|
|
struct got_repository *repo = NULL;
|
|
struct got_pathlist_head refs, symrefs, wanted_branches, wanted_refs;
|
|
struct got_pathlist_entry *pe;
|
|
@@ -275,6 +275,9 @@
|
|
goto done;
|
|
}
|
|
got_path_strip_trailing_slashes(server_path);
|
|
+ remote_repo_path = server_path;
|
|
+ while (remote_repo_path[0] == '/')
|
|
+ remote_repo_path++;
|
|
if (asprintf(&gotconfig,
|
|
"remote \"%s\" {\n"
|
|
"\tserver %s\n"
|
|
@@ -285,7 +288,7 @@
|
|
"}\n",
|
|
GOT_FETCH_DEFAULT_REMOTE_NAME, host, proto,
|
|
port ? "\tport " : "", port ? port : "", port ? "\n" : "",
|
|
- server_path,
|
|
+ remote_repo_path,
|
|
mirror_references ? "\tmirror-references yes\n" : "") == -1) {
|
|
error = got_error_from_errno("asprintf");
|
|
goto done;
|