rename got.conf(5) fetch-all-branches to fetch_all_branches for consistency Existing configuration files will keep working for now since the old name with dashes is still recognized by the config parser.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
diff --git a/got/got.1 b/got/got.1
index d2db3f1..d73ed0c 100644
--- a/got/got.1
+++ b/got/got.1
@@ -211,7 +211,7 @@ are as follows:
Fetch all branches from the remote repository's
.Dq refs/heads/
reference namespace and set
-.Cm fetch-all-branches
+.Cm fetch_all_branches
in the cloned repository's
.Xr got.conf 5
file for future use by
diff --git a/got/got.c b/got/got.c
index 6feb1c3..75efd58 100644
--- a/got/got.c
+++ b/got/got.c
@@ -1345,7 +1345,7 @@ create_gotconfig(const char *proto, const char *host, const char *port,
branches ? branches : "", branches ? "}\n" : "",
refs ? "\treference { " : "", refs ? refs : "", refs ? "}\n" : "",
mirror_references ? "\tmirror-references yes\n" : "",
- fetch_all_branches ? "\tfetch-all-branches yes\n" : "") == -1) {
+ fetch_all_branches ? "\tfetch_all_branches yes\n" : "") == -1) {
err = got_error_from_errno("asprintf");
goto done;
}
diff --git a/got/got.conf.5 b/got/got.conf.5
index 8fde4b1..d529aa6 100644
--- a/got/got.conf.5
+++ b/got/got.conf.5
@@ -120,7 +120,7 @@ and
command lines with the
.Fl b
option.
-.It Ic fetch-all-branches Ar yes | no
+.It Ic fetch_all_branches Ar yes | no
This option controls whether
.Cm got fetch
will fetch all branches from the remote repository by default.
diff --git a/libexec/got-read-gotconfig/parse.y b/libexec/got-read-gotconfig/parse.y
index 85fc623..61a08c3 100644
--- a/libexec/got-read-gotconfig/parse.y
+++ b/libexec/got-read-gotconfig/parse.y
@@ -368,7 +368,8 @@ lookup(char *s)
{"author", AUTHOR},
{"branch", BRANCH},
{"fetch", FETCH},
- {"fetch-all-branches", FETCH_ALL_BRANCHES},
+ {"fetch-all-branches", FETCH_ALL_BRANCHES}, /* deprecated */
+ {"fetch_all_branches", FETCH_ALL_BRANCHES},
{"mirror-references", MIRROR_REFERENCES},
{"port", PORT},
{"protocol", PROTOCOL},
diff --git a/regress/cmdline/clone.sh b/regress/cmdline/clone.sh
index e6353f2..192edf2 100755
--- a/regress/cmdline/clone.sh
+++ b/regress/cmdline/clone.sh
@@ -276,7 +276,7 @@ remote "origin" {
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- fetch-all-branches yes
+ fetch_all_branches yes
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
@@ -422,7 +422,7 @@ remote "origin" {
protocol ssh
repository "$testroot/repo"
mirror-references yes
- fetch-all-branches yes
+ fetch_all_branches yes
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected