commit - 520b3b00a2f77f07e9851c742bbd58fd82093dc6
commit + 795b1c60ba54eac7730d5367a72bf12ef0e73613
blob - d7cb0dbf7b3b8a617fc9d6ef910d8cc6f0a13613
blob + e67002a26d62e31e74091ab92c3ca85aa97329a4
--- got/got.c
+++ got/got.c
"\tprotocol %s\n"
"%s%s%s"
"\trepository \"%s\"\n"
+ "%s"
"%s%s%s"
+ "%s"
"%s%s%s"
"%s"
"%s"
"}\n",
GOT_FETCH_DEFAULT_REMOTE_NAME, host, proto,
port ? "\tport " : "", port ? port : "", port ? "\n" : "",
- remote_repo_path, branches ? "\tbranch { " : "",
- branches ? branches : "", branches ? "}\n" : "",
+ remote_repo_path,
+ branches ? "\tfetch {\n" : "",
+ branches ? "\t\tbranch { " : "",
+ branches ? branches : "",
+ branches ? "}\n" : "",
+ branches ? "\t}\n" : "",
refs ? "\treference { " : "", refs ? refs : "", refs ? "}\n" : "",
mirror_references ? "\tmirror_references yes\n" : "",
fetch_all_branches ? "\tfetch_all_branches yes\n" : "") == -1) {
blob - 184a0cab35d28783c255c1494d78b1695189a105
blob + e9daec23e99eaee20166b09dfb7ebbde29181db1
--- regress/cmdline/clone.sh
+++ regress/cmdline/clone.sh
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "master" }
+ fetch {
+ branch { "master" }
+ }
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "foo" }
+ fetch {
+ branch { "foo" }
+ }
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "master" }
+ fetch {
+ branch { "master" }
+ }
mirror_references yes
}
EOF
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "master" }
+ fetch {
+ branch { "master" }
+ }
reference { "hoo" }
}
EOF
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "foo" }
+ fetch {
+ branch { "foo" }
+ }
reference { "hoo/boo/zoo" }
}
EOF
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "master" }
+ fetch {
+ branch { "master" }
+ }
reference { "hoo" }
mirror_references yes
}
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "bar" "foo" }
+ fetch {
+ branch { "bar" "foo" }
+ }
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
server 127.0.0.1
protocol ssh
repository "$testroot/repo"
- branch { "foo" }
+ fetch {
+ branch { "foo" }
+ }
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
protocol http
port $GOT_TEST_HTTP_PORT
repository "/repo"
- branch { "master" }
+ fetch {
+ branch { "master" }
+ }
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
blob - 9bda4d3b425e3cfc1eaf1893388d1c2ad82c2065
blob + aac6a219e2b443b516724c8444a2c326b6bdcf49
--- regress/cmdline/fetch.sh
+++ regress/cmdline/fetch.sh
# remove default branch from got.conf, fetch all branches
ed -s $testroot/repo-clone/got.conf <<-EOF
+ /fetch {/d
/branch {/c
fetch_all_branches yes
.
+ /}/d
w
EOF