aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/git.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/git.h')
-rw-r--r--src/git.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/git.h b/src/git.h
new file mode 100644
index 0000000..83b9c49
--- /dev/null
+++ b/src/git.h
@@ -0,0 +1,19 @@
+#ifndef __GIT_H__
+#define __GIT_H__
+
+#include <git2.h>
+
+int libgit_init();
+void libgit_shutdown();
+
+/* These never check out any files (so that we don't have to do 2 checkouts). */
+int libgit_clone(git_repository **, const char *url, const char *dir);
+int libgit_clone_to_tmp(git_repository **, const char *url);
+
+/* Free a cloned repository. */
+void libgit_repository_free(git_repository *);
+
+/* I tried to make this an equivalent of `git checkout`. */
+int libgit_checkout(git_repository *, const char *rev);
+
+#endif