File: annotated_commit.c

package info (click to toggle)
libgit2 1.1.0%2Bdfsg.1-4%2Bdeb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 53,324 kB
  • sloc: ansic: 173,567; sh: 562; python: 351; php: 65; makefile: 50
file content (26 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (7)
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
#include "clar_libgit2.h"


static git_repository *g_repo;

void test_merge_annotated_commit__initialize(void)
{
	g_repo = cl_git_sandbox_init("testrepo");
}

void test_merge_annotated_commit__cleanup(void)
{
	cl_git_sandbox_cleanup();
}

void test_merge_annotated_commit__lookup_annotated_tag(void)
{
	git_annotated_commit *commit;
	git_reference *ref;

	cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/tags/test"));
	cl_git_pass(git_annotated_commit_from_ref(&commit, g_repo, ref));

	git_annotated_commit_free(commit);
	git_reference_free(ref);
}