aboutsummaryrefslogtreecommitdiff
path: root/src/git/repo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/git/repo.rs')
-rw-r--r--src/git/repo.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/git/repo.rs b/src/git/repo.rs
deleted file mode 100644
index 0d04b0d..0000000
--- a/src/git/repo.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-use crate::templ_data::repo::RepoData;
-use git2::{Oid, Repository, Tree};
-
-/// Represents a repo in libgit2
-pub(crate) struct Repo {
- pub(crate) inner: Repository,
-}
-
-impl Repo {
- pub(crate) fn new(path: &str) -> Self {
- Self {
- inner: Repository::open(path).expect(&format!("`{}` is not a valid git repo", path)),
- }
- }
-}
-
-pub(crate) fn get_tree<'r>(repo: &'r Repository, rev: &str) -> Tree<'r> {
- repo.revparse_single(rev).unwrap().peel_to_tree().unwrap()
-}