diff options
author | yuangli <yuangli@mathworks.com> | 2022-07-29 16:04:43 +0100 |
---|---|---|
committer | yuangli <yuangli@mathworks.com> | 2022-07-29 16:04:43 +0100 |
commit | 179aac788d45d3683a93ad478bfb7371c549ca98 (patch) | |
tree | 326f023bee607629741245453c20416c75195aec | |
parent | 598ec303c6862f581c22c49228d543442e30257a (diff) | |
download | libgit2-179aac788d45d3683a93ad478bfb7371c549ca98.tar.gz |
fix clone::shallow test behaviour
-rw-r--r-- | src/libgit2/transports/smart_protocol.c | 2 | ||||
-rw-r--r-- | tests/libgit2/clone/shallow.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/libgit2/transports/smart_protocol.c b/src/libgit2/transports/smart_protocol.c index cd90db43f..f2a6ac508 100644 --- a/src/libgit2/transports/smart_protocol.c +++ b/src/libgit2/transports/smart_protocol.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) { if (pkt->type == GIT_PKT_SHALLOW) { - printf("shallow %s\n", git_oid_tostr_s(&pkt->oid)); git_shallowarray_add(wants->shallow_roots, &pkt->oid); } 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); } else if (pkt->type == GIT_PKT_FLUSH) { /* Server is done, stop processing shallow oids */ diff --git a/tests/libgit2/clone/shallow.c b/tests/libgit2/clone/shallow.c index 2cd3d6cac..4b27b27a9 100644 --- a/tests/libgit2/clone/shallow.c +++ b/tests/libgit2/clone/shallow.c @@ -29,7 +29,7 @@ void test_clone_shallow__clone_depth_one(void) git_revwalk *walk; git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT; git_oid oid; - roots; + git_oidarray roots; size_t num_commits = 0; int error = 0; |