Rebasing onto libgit2/development: cleanup.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
diff --git a/tests-clar/network/remotelocal.c b/tests-clar/network/remotelocal.c
index 86461b1..4bf9fb6 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 b65378e..8eb228d 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 c069846..b831892 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-clar/resources/testrepo.git/logs/HEAD b/tests-clar/resources/testrepo.git/logs/HEAD
new file mode 100644
index 0000000..b16c9b3
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/logs/HEAD
@@ -0,0 +1,5 @@
+0000000000000000000000000000000000000000 be3563ae3f795b2b4353bcce3a527ad0a4f7f644 Ben Straub <bstraub@github.com> 1335806563 -0700 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
+be3563ae3f795b2b4353bcce3a527ad0a4f7f644 a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1335806603 -0900 commit:
+a65fedf39aefe402d3bb6e24df4d4f5fe4547750 c47800c7266a2be04c571c04d5a6614691ea99bd Ben Straub <bstraub@github.com> 1335806608 -0900 checkout: moving from master to br2
+c47800c7266a2be04c571c04d5a6614691ea99bd a4a7dce85cf63874e984719f4fdd239f5145052f Ben Straub <bstraub@github.com> 1335806617 -0900 commit: checking in
+a4a7dce85cf63874e984719f4fdd239f5145052f a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1335806621 -0900 checkout: moving from br2 to master
diff --git a/tests-clar/resources/testrepo.git/logs/refs/heads/br2 b/tests-clar/resources/testrepo.git/logs/refs/heads/br2
new file mode 100644
index 0000000..4e27f6b
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/logs/refs/heads/br2
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000 c47800c7266a2be04c571c04d5a6614691ea99bd Ben Straub <bstraub@github.com> 1335806608 -0700 branch: Created from refs/remotes/origin/br2
+a4a7dce85cf63874e984719f4fdd239f5145052f a4a7dce85cf63874e984719f4fdd239f5145052f Ben Straub <bstraub@github.com> 1335806617 -0700 commit: checking in
diff --git a/tests-clar/resources/testrepo.git/logs/refs/heads/master b/tests-clar/resources/testrepo.git/logs/refs/heads/master
new file mode 100644
index 0000000..e1c729a
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/logs/refs/heads/master
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000 be3563ae3f795b2b4353bcce3a527ad0a4f7f644 Ben Straub <bstraub@github.com> 1335806563 -0800 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
+be3563ae3f795b2b4353bcce3a527ad0a4f7f644 a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1335806603 -0800 commit: checking in
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 0000000..bfbeacb
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/logs/refs/heads/not-good
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1336761944 -0700 branch: Created from master
diff --git a/tests-clar/resources/testrepo.git/logs/refs/remotes/origin/HEAD b/tests-clar/resources/testrepo.git/logs/refs/remotes/origin/HEAD
new file mode 100644
index 0000000..f1aac6d
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/logs/refs/remotes/origin/HEAD
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 be3563ae3f795b2b4353bcce3a527ad0a4f7f644 Ben Straub <bstraub@github.com> 1335806563 -0700 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
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 0000000..71019a6
--- /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-clar/resources/testrepo.git/refs/heads/not-good b/tests-clar/resources/testrepo.git/refs/heads/not-good
new file mode 100644
index 0000000..3d8f0a4
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/refs/heads/not-good
@@ -0,0 +1 @@
+a65fedf39aefe402d3bb6e24df4d4f5fe4547750
diff --git a/tests-clar/resources/testrepo.git/refs/remotes/test/master b/tests-clar/resources/testrepo.git/refs/remotes/test/master
new file mode 100644
index 0000000..9536ad8
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/refs/remotes/test/master
@@ -0,0 +1 @@
+be3563ae3f795b2b4353bcce3a527ad0a4f7f644
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 0000000..59ce656
--- /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 0000000..59ce656
--- /dev/null
+++ b/tests-clar/resources/testrepo.git/refs/tags/wrapped_tag
@@ -0,0 +1 @@
+849a5e34a26815e821f865b8479f5815a47af0fe
diff --git a/tests/resources/testrepo.git/logs/HEAD b/tests/resources/testrepo.git/logs/HEAD
deleted file mode 100644
index b16c9b3..0000000
--- a/tests/resources/testrepo.git/logs/HEAD
+++ /dev/null
@@ -1,5 +0,0 @@
-0000000000000000000000000000000000000000 be3563ae3f795b2b4353bcce3a527ad0a4f7f644 Ben Straub <bstraub@github.com> 1335806563 -0700 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
-be3563ae3f795b2b4353bcce3a527ad0a4f7f644 a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1335806603 -0900 commit:
-a65fedf39aefe402d3bb6e24df4d4f5fe4547750 c47800c7266a2be04c571c04d5a6614691ea99bd Ben Straub <bstraub@github.com> 1335806608 -0900 checkout: moving from master to br2
-c47800c7266a2be04c571c04d5a6614691ea99bd a4a7dce85cf63874e984719f4fdd239f5145052f Ben Straub <bstraub@github.com> 1335806617 -0900 commit: checking in
-a4a7dce85cf63874e984719f4fdd239f5145052f a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1335806621 -0900 checkout: moving from br2 to master
diff --git a/tests/resources/testrepo.git/logs/refs/heads/br2 b/tests/resources/testrepo.git/logs/refs/heads/br2
deleted file mode 100644
index 4e27f6b..0000000
--- a/tests/resources/testrepo.git/logs/refs/heads/br2
+++ /dev/null
@@ -1,2 +0,0 @@
-0000000000000000000000000000000000000000 c47800c7266a2be04c571c04d5a6614691ea99bd Ben Straub <bstraub@github.com> 1335806608 -0700 branch: Created from refs/remotes/origin/br2
-a4a7dce85cf63874e984719f4fdd239f5145052f a4a7dce85cf63874e984719f4fdd239f5145052f Ben Straub <bstraub@github.com> 1335806617 -0700 commit: checking in
diff --git a/tests/resources/testrepo.git/logs/refs/heads/master b/tests/resources/testrepo.git/logs/refs/heads/master
deleted file mode 100644
index e1c729a..0000000
--- a/tests/resources/testrepo.git/logs/refs/heads/master
+++ /dev/null
@@ -1,2 +0,0 @@
-0000000000000000000000000000000000000000 be3563ae3f795b2b4353bcce3a527ad0a4f7f644 Ben Straub <bstraub@github.com> 1335806563 -0800 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
-be3563ae3f795b2b4353bcce3a527ad0a4f7f644 a65fedf39aefe402d3bb6e24df4d4f5fe4547750 Ben Straub <bstraub@github.com> 1335806603 -0800 commit: checking in
diff --git a/tests/resources/testrepo.git/logs/refs/remotes/origin/HEAD b/tests/resources/testrepo.git/logs/refs/remotes/origin/HEAD
deleted file mode 100644
index f1aac6d..0000000
--- a/tests/resources/testrepo.git/logs/refs/remotes/origin/HEAD
+++ /dev/null
@@ -1 +0,0 @@
-0000000000000000000000000000000000000000 be3563ae3f795b2b4353bcce3a527ad0a4f7f644 Ben Straub <bstraub@github.com> 1335806563 -0700 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
diff --git a/tests/resources/testrepo.git/objects/d7/eddec7b3610726791785bf839065953f10341b b/tests/resources/testrepo.git/objects/d7/eddec7b3610726791785bf839065953f10341b
deleted file mode 100644
index 32fc532..0000000
--- a/tests/resources/testrepo.git/objects/d7/eddec7b3610726791785bf839065953f10341b
+++ /dev/null
@@ -1,2 +0,0 @@
-xM F]s41x(IKݽ/_P@!8)es
- N&FGSƄh{+CZzvF7Z-kx\[PX<:m쥗RG./
\ No newline at end of file
diff --git a/tests/resources/testrepo.git/refs/heads/not-good b/tests/resources/testrepo.git/refs/heads/not-good
deleted file mode 100644
index 3d8f0a4..0000000
--- a/tests/resources/testrepo.git/refs/heads/not-good
+++ /dev/null
@@ -1 +0,0 @@
-a65fedf39aefe402d3bb6e24df4d4f5fe4547750
diff --git a/tests/resources/testrepo.git/refs/remotes/test/master b/tests/resources/testrepo.git/refs/remotes/test/master
deleted file mode 100644
index 9536ad8..0000000
--- a/tests/resources/testrepo.git/refs/remotes/test/master
+++ /dev/null
@@ -1 +0,0 @@
-be3563ae3f795b2b4353bcce3a527ad0a4f7f644
diff --git a/tests/resources/testrepo.git/refs/tags/hard_tag b/tests/resources/testrepo.git/refs/tags/hard_tag
deleted file mode 100644
index 1621c20..0000000
--- a/tests/resources/testrepo.git/refs/tags/hard_tag
+++ /dev/null
@@ -1 +0,0 @@
-d7eddec7b3610726791785bf839065953f10341b
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 1621c20..0000000
--- a/tests/resources/testrepo.git/refs/tags/wrapped_tag
+++ /dev/null
@@ -1 +0,0 @@
-d7eddec7b3610726791785bf839065953f10341b