Commit 8ceee1120def5e59bb412ae3be084c4007fbe734

Stefan Sperling 2020-03-20T16:04:33

add refspec which git-fetch expects in config file of mirrored repositories

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/got/got.c b/got/got.c
index 35b58f0..d3f4040 100644
--- a/got/got.c
+++ b/got/got.c
@@ -1115,6 +1115,7 @@ cmd_clone(int argc, char *argv[])
 		if (asprintf(&gitconfig,
 		    "[remote \"%s\"]\n"
 		    "\turl = %s\n"
+		    "\tfetch = +refs/*:refs/*\n"
 		    "\tmirror = true\n",
 		    GOT_FETCH_DEFAULT_REMOTE_NAME, git_url) == -1) {
 			error = got_error_from_errno("asprintf");