From 92ad5a5cda94c04b24d84c20ede235d69bedb988 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Fri, 11 May 2012 11:50:54 -0700 Subject: [PATCH] Rebasing onto libgit2/development: cleanup. --- tests-clar/network/remotelocal.c | 4 ++-- tests-clar/refs/branches/listall.c | 4 ++-- tests-clar/refs/revparse.c | 4 ++-- .../resources/testrepo.git/logs/HEAD | Bin .../resources/testrepo.git/logs/refs/heads/br2 | Bin .../resources/testrepo.git/logs/refs/heads/master | Bin .../testrepo.git/logs/refs/heads/not-good | 1 + .../testrepo.git/logs/refs/remotes/origin/HEAD | Bin .../84/9a5e34a26815e821f865b8479f5815a47af0fe | 2 ++ .../resources/testrepo.git/refs/heads/not-good | Bin .../testrepo.git/refs/remotes/test/master | Bin .../resources/testrepo.git/refs/tags/hard_tag | 1 + .../resources/testrepo.git/refs/tags/wrapped_tag | 1 + .../d7/eddec7b3610726791785bf839065953f10341b | Bin 134 -> 0 bytes tests/resources/testrepo.git/refs/tags/hard_tag | Bin 41 -> 0 bytes .../resources/testrepo.git/refs/tags/wrapped_tag | Bin 41 -> 0 bytes 16 files changed, 11 insertions(+), 6 deletions(-) rename {tests => tests-clar}/resources/testrepo.git/logs/HEAD (100%) rename {tests => tests-clar}/resources/testrepo.git/logs/refs/heads/br2 (100%) rename {tests => tests-clar}/resources/testrepo.git/logs/refs/heads/master (100%) create mode 100644 tests-clar/resources/testrepo.git/logs/refs/heads/not-good rename {tests => tests-clar}/resources/testrepo.git/logs/refs/remotes/origin/HEAD (100%) create mode 100644 tests-clar/resources/testrepo.git/objects/84/9a5e34a26815e821f865b8479f5815a47af0fe rename {tests => tests-clar}/resources/testrepo.git/refs/heads/not-good (100%) rename {tests => tests-clar}/resources/testrepo.git/refs/remotes/test/master (100%) create mode 100644 tests-clar/resources/testrepo.git/refs/tags/hard_tag create mode 100644 tests-clar/resources/testrepo.git/refs/tags/wrapped_tag delete mode 100644 tests/resources/testrepo.git/objects/d7/eddec7b3610726791785bf839065953f10341b delete mode 100644 tests/resources/testrepo.git/refs/tags/hard_tag delete mode 100644 tests/resources/testrepo.git/refs/tags/wrapped_tag diff --git a/tests-clar/network/remotelocal.c b/tests-clar/network/remotelocal.c index 86461b1e5..4bf9fb6d8 100644 --- a/tests-clar/network/remotelocal.c +++ b/tests-clar/network/remotelocal.c @@ -98,7 +98,7 @@ void test_network_remotelocal__retrieve_advertised_references(void) cl_git_pass(git_remote_ls(remote, &count_ref__cb, &how_many_refs)); - cl_assert_equal_i(how_many_refs, 19); + cl_assert_equal_i(how_many_refs, 20); } void test_network_remotelocal__retrieve_advertised_references_from_spaced_repository(void) @@ -112,7 +112,7 @@ void test_network_remotelocal__retrieve_advertised_references_from_spaced_reposi cl_git_pass(git_remote_ls(remote, &count_ref__cb, &how_many_refs)); - cl_assert_equal_i(how_many_refs, 19); + cl_assert_equal_i(how_many_refs, 20); git_remote_free(remote); /* Disconnect from the "spaced repo" before the cleanup */ remote = NULL; diff --git a/tests-clar/refs/branches/listall.c b/tests-clar/refs/branches/listall.c index b65378e35..8eb228d31 100644 --- a/tests-clar/refs/branches/listall.c +++ b/tests-clar/refs/branches/listall.c @@ -35,7 +35,7 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count) void test_refs_branches_listall__retrieve_all_branches(void) { - assert_retrieval(GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, 8); + assert_retrieval(GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, 9); } void test_refs_branches_listall__retrieve_remote_branches(void) @@ -45,5 +45,5 @@ void test_refs_branches_listall__retrieve_remote_branches(void) void test_refs_branches_listall__retrieve_local_branches(void) { - assert_retrieval(GIT_BRANCH_LOCAL, 6); + assert_retrieval(GIT_BRANCH_LOCAL, 7); } diff --git a/tests-clar/refs/revparse.c b/tests-clar/refs/revparse.c index c069846e7..b8318923d 100644 --- a/tests-clar/refs/revparse.c +++ b/tests-clar/refs/revparse.c @@ -13,7 +13,7 @@ static void test_object(const char *spec, const char *expected_oid) char objstr[64] = {0}; cl_git_pass(git_revparse_single(&g_obj, g_repo, spec)); - git_oid_to_string(objstr, 64, git_object_id(g_obj)); + git_oid_fmt(objstr, git_object_id(g_obj)); cl_assert_equal_s(objstr, expected_oid); git_object_free(g_obj); @@ -131,7 +131,7 @@ void test_refs_revparse__revwalk(void) cl_git_fail(git_revparse_single(&g_obj, g_repo, "master^{/not found in any commit}")); cl_git_fail(git_revparse_single(&g_obj, g_repo, "master^{/merge}")); cl_git_fail(git_revparse_single(&g_obj, g_repo, "master^{/((}")); - cl_assert(strstr(git_lasterror(), "parentheses not balanced") != NULL); + cl_assert(strstr(giterr_last()->message, "parentheses not balanced") != NULL); test_object("master^{/anoth}", "5b5b025afb0b4c913b4c338a42934a3863bf3644"); test_object("master^{/Merge}", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"); diff --git a/tests/resources/testrepo.git/logs/HEAD b/tests-clar/resources/testrepo.git/logs/HEAD similarity index 100% rename from tests/resources/testrepo.git/logs/HEAD rename to tests-clar/resources/testrepo.git/logs/HEAD diff --git a/tests/resources/testrepo.git/logs/refs/heads/br2 b/tests-clar/resources/testrepo.git/logs/refs/heads/br2 similarity index 100% rename from tests/resources/testrepo.git/logs/refs/heads/br2 rename to tests-clar/resources/testrepo.git/logs/refs/heads/br2 diff --git a/tests/resources/testrepo.git/logs/refs/heads/master b/tests-clar/resources/testrepo.git/logs/refs/heads/master similarity index 100% rename from tests/resources/testrepo.git/logs/refs/heads/master rename to tests-clar/resources/testrepo.git/logs/refs/heads/master diff --git a/tests-clar/resources/testrepo.git/logs/refs/heads/not-good b/tests-clar/resources/testrepo.git/logs/refs/heads/not-good new file mode 100644 index 000000000..bfbeacb8a --- /dev/null +++ b/tests-clar/resources/testrepo.git/logs/refs/heads/not-good @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub 1336761944 -0700 branch: Created from master diff --git a/tests/resources/testrepo.git/logs/refs/remotes/origin/HEAD b/tests-clar/resources/testrepo.git/logs/refs/remotes/origin/HEAD similarity index 100% rename from tests/resources/testrepo.git/logs/refs/remotes/origin/HEAD rename to tests-clar/resources/testrepo.git/logs/refs/remotes/origin/HEAD diff --git a/tests-clar/resources/testrepo.git/objects/84/9a5e34a26815e821f865b8479f5815a47af0fe b/tests-clar/resources/testrepo.git/objects/84/9a5e34a26815e821f865b8479f5815a47af0fe new file mode 100644 index 000000000..71019a636 --- /dev/null +++ b/tests-clar/resources/testrepo.git/objects/84/9a5e34a26815e821f865b8479f5815a47af0fe @@ -0,0 +1,2 @@ +xM F]s41x(IKݽ/_P@!8)es + N&FGSƄh{+CZzvF7Z-kx\[P8GK/^ l>.4 \ No newline at end of file diff --git a/tests/resources/testrepo.git/refs/heads/not-good b/tests-clar/resources/testrepo.git/refs/heads/not-good similarity index 100% rename from tests/resources/testrepo.git/refs/heads/not-good rename to tests-clar/resources/testrepo.git/refs/heads/not-good diff --git a/tests/resources/testrepo.git/refs/remotes/test/master b/tests-clar/resources/testrepo.git/refs/remotes/test/master similarity index 100% rename from tests/resources/testrepo.git/refs/remotes/test/master rename to tests-clar/resources/testrepo.git/refs/remotes/test/master diff --git a/tests-clar/resources/testrepo.git/refs/tags/hard_tag b/tests-clar/resources/testrepo.git/refs/tags/hard_tag new file mode 100644 index 000000000..59ce65649 --- /dev/null +++ b/tests-clar/resources/testrepo.git/refs/tags/hard_tag @@ -0,0 +1 @@ +849a5e34a26815e821f865b8479f5815a47af0fe diff --git a/tests-clar/resources/testrepo.git/refs/tags/wrapped_tag b/tests-clar/resources/testrepo.git/refs/tags/wrapped_tag new file mode 100644 index 000000000..59ce65649 --- /dev/null +++ b/tests-clar/resources/testrepo.git/refs/tags/wrapped_tag @@ -0,0 +1 @@ +849a5e34a26815e821f865b8479f5815a47af0fe diff --git a/tests/resources/testrepo.git/objects/d7/eddec7b3610726791785bf839065953f10341b b/tests/resources/testrepo.git/objects/d7/eddec7b3610726791785bf839065953f10341b deleted file mode 100644 index 32fc53202e7c7e9b3c9e6eedbd443f9efb03764a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmV;10D1p-0UeA@4#FT1MqP7?xqybB0W>kjcm>@XC+|D2m`>sX}}4CI*9a-;9c`|zsrKFa63~ORuf2ZOT(z(Xsr+GMG8v* diff --git a/tests/resources/testrepo.git/refs/tags/wrapped_tag b/tests/resources/testrepo.git/refs/tags/wrapped_tag deleted file mode 100644 index 1621c20d698c61eacb4c43f3967b4c693d51e117..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41 ucmV~$K>+|D2m`>sX}}4CI*9a-;9c`|zsrKFa63~ORuf2ZOT(z(Xsr+GMG8v*