Commit Diff


commit - f1bf60d10a22f5990303b68967a6cbffab2c5f04
commit + 26e6f38e73535ec12ae2ba9e4f78cd6f41b14c63
blob - 75efd58df925f43ed22b625e5edd5c29db154d2f
blob + 78d21329448a5ced385a2691f8f4294e0935e230
--- got/got.c
+++ got/got.c
@@ -1344,7 +1344,7 @@ create_gotconfig(const char *proto, const char *host, 
 	    remote_repo_path, branches ? "\tbranch { " : "",
 	    branches ? branches : "", branches ? "}\n" : "", 
 	    refs ? "\treference { " : "", refs ? refs : "", refs ? "}\n" : "", 
-	    mirror_references ? "\tmirror-references yes\n" : "",
+	    mirror_references ? "\tmirror_references yes\n" : "",
 	    fetch_all_branches ? "\tfetch_all_branches yes\n" : "") == -1) {
 		err = got_error_from_errno("asprintf");
 		goto done;
blob - d529aa621ed42968bf9ec5a26a20886121bb26b9
blob + 5827c264f952cb78e122d0a899886cfbedf1aab2
--- got/got.conf.5
+++ got/got.conf.5
@@ -151,7 +151,7 @@ In any case, references in the
 .Dq refs/tags/
 namespace will always be fetched and mapped directly to local references
 in the same namespace.
-.It Ic mirror-references Ar yes | no
+.It Ic mirror_references Ar yes | no
 This option controls the behaviour of
 .Cm got fetch
 when updating references.
@@ -239,7 +239,7 @@ remote "origin" {
 	repository "openbsd/src"
 	server git@github.com
 	protocol git+ssh
-	mirror-references yes
+	mirror_references yes
 }
 .Ed
 .Pp
blob - 61a08c3626a1654a2453e145a115e5a9c7dda4b4
blob + 75ffe68ef694e38f5138920800c795cdc7b10080
--- libexec/got-read-gotconfig/parse.y
+++ libexec/got-read-gotconfig/parse.y
@@ -370,7 +370,8 @@ lookup(char *s)
 		{"fetch",		FETCH},
 		{"fetch-all-branches",	FETCH_ALL_BRANCHES}, /* deprecated */
 		{"fetch_all_branches",	FETCH_ALL_BRANCHES},
-		{"mirror-references",	MIRROR_REFERENCES},
+		{"mirror-references",	MIRROR_REFERENCES}, /* deprecated */
+		{"mirror_references",	MIRROR_REFERENCES},
 		{"port",		PORT},
 		{"protocol",		PROTOCOL},
 		{"reference",		REFERENCE},
blob - 192edf26e55801998924e5735bd4c73a5c1a336c
blob + 35d7c0ba41e646078b5beea834a05d4d28891363
--- regress/cmdline/clone.sh
+++ regress/cmdline/clone.sh
@@ -349,7 +349,7 @@ remote "origin" {
 	protocol ssh
 	repository "$testroot/repo"
 	branch { "master" }
-	mirror-references yes
+	mirror_references yes
 }
 EOF
 	cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
@@ -421,7 +421,7 @@ remote "origin" {
 	server 127.0.0.1
 	protocol ssh
 	repository "$testroot/repo"
-	mirror-references yes
+	mirror_references yes
 	fetch_all_branches yes
 }
 EOF
@@ -649,7 +649,7 @@ remote "origin" {
 	repository "$testroot/repo"
 	branch { "master" }
 	reference { "hoo" }
-	mirror-references yes
+	mirror_references yes
 }
 EOF
 	cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected