diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2012-04-06 14:34:26 +0200 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2012-04-10 21:38:49 +0200 |
| commit | 3f46f313cbfcf57e5cbf3d7dc55b747568a21bef (patch) | |
| tree | 2fd2f35c2d48bf6adb27279c64fb086af73f8961 /tests | |
| parent | 09719c500ca798fea989867f50cf29d4dbed0c89 (diff) | |
| download | libgit2-3f46f313cbfcf57e5cbf3d7dc55b747568a21bef.tar.gz | |
tag: Add git_tag_peel() which recursively peel a tag until a non tag git_object is met
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/resources/testrepo.git/objects/52/1d87c1ec3aef9824daf6d96cc0ae3710766d91 | bin | 0 -> 152 bytes | |||
| -rw-r--r-- | tests/resources/testrepo.git/refs/tags/annotated_tag_to_blob | 1 | ||||
| -rw-r--r-- | tests/t08-tag.c | 8 | ||||
| -rw-r--r-- | tests/t10-refs.c | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/tests/resources/testrepo.git/objects/52/1d87c1ec3aef9824daf6d96cc0ae3710766d91 b/tests/resources/testrepo.git/objects/52/1d87c1ec3aef9824daf6d96cc0ae3710766d91 Binary files differnew file mode 100644 index 00000000..351cff82 --- /dev/null +++ b/tests/resources/testrepo.git/objects/52/1d87c1ec3aef9824daf6d96cc0ae3710766d91 diff --git a/tests/resources/testrepo.git/refs/tags/annotated_tag_to_blob b/tests/resources/testrepo.git/refs/tags/annotated_tag_to_blob new file mode 100644 index 00000000..6c146d6e --- /dev/null +++ b/tests/resources/testrepo.git/refs/tags/annotated_tag_to_blob @@ -0,0 +1 @@ +521d87c1ec3aef9824daf6d96cc0ae3710766d91 diff --git a/tests/t08-tag.c b/tests/t08-tag.c index 4cbd4837..1586be1f 100644 --- a/tests/t08-tag.c +++ b/tests/t08-tag.c @@ -73,7 +73,7 @@ BEGIN_TEST(read1, "list all tag names from the repository") must_pass(git_repository_open(&repo, REPOSITORY_FOLDER)); must_pass(git_tag_list(&tag_list, repo)); - must_be_true(tag_list.count == 3); + must_be_true(tag_list.count == 4); git_strarray_free(&tag_list); git_repository_free(repo); @@ -98,10 +98,10 @@ exit: BEGIN_TEST(read2, "list all tag names from the repository matching a specified pattern") git_repository *repo; must_pass(git_repository_open(&repo, REPOSITORY_FOLDER)); - must_pass(ensure_tag_pattern_match(repo, "", 3)); - must_pass(ensure_tag_pattern_match(repo, "*", 3)); + must_pass(ensure_tag_pattern_match(repo, "", 4)); + must_pass(ensure_tag_pattern_match(repo, "*", 4)); must_pass(ensure_tag_pattern_match(repo, "t*", 1)); - must_pass(ensure_tag_pattern_match(repo, "*b", 2)); + must_pass(ensure_tag_pattern_match(repo, "*b", 3)); must_pass(ensure_tag_pattern_match(repo, "e", 0)); must_pass(ensure_tag_pattern_match(repo, "e90810b", 1)); must_pass(ensure_tag_pattern_match(repo, "e90810[ab]", 1)); diff --git a/tests/t10-refs.c b/tests/t10-refs.c index ad881726..7229ded9 100644 --- a/tests/t10-refs.c +++ b/tests/t10-refs.c @@ -1164,10 +1164,10 @@ BEGIN_TEST(list0, "try to list all the references in our test repo") printf("# %s\n", ref_list.strings[i]); }*/ - /* We have exactly 9 refs in total if we include the packed ones: + /* We have exactly 10 refs in total if we include the packed ones: * there is a reference that exists both in the packfile and as * loose, but we only list it once */ - must_be_true(ref_list.count == 9); + must_be_true(ref_list.count == 10); git_strarray_free(&ref_list); git_repository_free(repo); |
