summaryrefslogtreecommitdiffstats
path: root/volgit.c
blob: dc391e7474b9e70747b7f5c9bf8375246b4eeda7 (plain)
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 <stdio.h>
#include <git2.h>
#include <git_part.h>

int main(int argc,char **argv)
{
	const char *repo_path;

	if(argc<=1)
	{
		fprintf(stderr,"You need to specify a source dir for the repo\n");
		return 1;
	}

	git_repository *repo;

	git_libgit2_init();
	git_repository_open(&repo,argv[1]);

	print_branches(repo);

	git_repository_free(repo);
	git_libgit2_shutdown();

	return 0;
}