git_tag *bad_tag;
git_commit *commit;
git_oid id, id_commit;
- git_strarray ref_list;
// TODO: This is a little messy
cl_git_pass(git_repository_open(&bad_tag_repo, cl_fixture("bad_tag.git")));
cl_assert(git_oid_cmp(&id_commit, git_commit_id(commit)) == 0);
- cl_git_pass(git_reference_list(&ref_list, bad_tag_repo, GIT_REF_LISTALL));
- git_strarray_free(&ref_list);
git_tag_free(bad_tag);
git_commit_free(commit);
git_repository_free(bad_tag_repo);
{
ensure_no_refname_starts_with_a_forward_slash(cl_fixture("testrepo.git"));
}
+
+void test_refs_listall__from_repository_with_no_trailing_newline(void)
+{
+ cl_git_pass(git_repository_open(&repo, cl_fixture("bad_tag.git")));
+ cl_git_pass(git_reference_list(&ref_list, repo, GIT_REF_LISTALL));
+
+ cl_assert(ref_list.count > 0);
+
+ git_strarray_free(&ref_list);
+ git_repository_free(repo);
+}