commit - 1a201d3a3d7a268be170cb71688ea1d7d0ca79523076f50ff5a423f7806397dd
commit + 8b5c397a986e28b7e29988879d382a39027f8ed3a16d96bb01da09e466a02e7c
blob - 18dfd24d46c393580d4aaaa55d31fbda699118f666ab268ce87ea9c1ba3eb374
blob + 09f73d128be7394226b37c83bb9a6501f148597b7ad640910d9d16f834117c71
--- 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 - 74d24f12e750bb8ea0cf0e6f52b95c3e2485d10776482bc5bae849ee1fc53a2a
blob + 0cef34ecd4d8443662062bd91ba16202e4b92eb166d8b2bcf14bc97bea072f3d
--- 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 - 0018862da4eae0ac26fae39ee326c8f08450f26e2fde0e7747332a096935a4be
blob + d78b90d69e94a6e24d03531abf2f64d646bd412c939a53baddd7ae076c5fe274
--- 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