commit - 8df39a000dfa5a10c68b3631e1ad316acd69e111
commit + 67e1bc05349929c2485ed00e3aa04272da0cabd8
blob - 80379bddab5170afe5c0e8cbb9bd21f4d8362982
blob + bd5af8c0b0571f83a5818af322e15e0785dee8f9
--- 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