Commit 179aac78 by yuangli

fix clone::shallow test behaviour

parent 598ec303
...@@ -375,10 +375,8 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c ...@@ -375,10 +375,8 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
while ((error = recv_pkt((git_pkt **)&pkt, NULL, buf)) == 0) { while ((error = recv_pkt((git_pkt **)&pkt, NULL, buf)) == 0) {
if (pkt->type == GIT_PKT_SHALLOW) { if (pkt->type == GIT_PKT_SHALLOW) {
printf("shallow %s\n", git_oid_tostr_s(&pkt->oid));
git_shallowarray_add(wants->shallow_roots, &pkt->oid); git_shallowarray_add(wants->shallow_roots, &pkt->oid);
} else if (pkt->type == GIT_PKT_UNSHALLOW) { } else if (pkt->type == GIT_PKT_UNSHALLOW) {
printf("unshallow %s\n", git_oid_tostr_s(&pkt->oid));
git_shallowarray_remove(wants->shallow_roots, &pkt->oid); git_shallowarray_remove(wants->shallow_roots, &pkt->oid);
} else if (pkt->type == GIT_PKT_FLUSH) { } else if (pkt->type == GIT_PKT_FLUSH) {
/* Server is done, stop processing shallow oids */ /* Server is done, stop processing shallow oids */
......
...@@ -29,7 +29,7 @@ void test_clone_shallow__clone_depth_one(void) ...@@ -29,7 +29,7 @@ void test_clone_shallow__clone_depth_one(void)
git_revwalk *walk; git_revwalk *walk;
git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT; git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT;
git_oid oid; git_oid oid;
roots; git_oidarray roots;
size_t num_commits = 0; size_t num_commits = 0;
int error = 0; int error = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment