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
use std::ops::DerefMut;
use crate::easy;
pub trait RepositoryAccessExt: easy::Access + Sized {
fn committer(&self) -> git_actor::Signature {
git_actor::Signature::empty()
}
fn hash_kind(&self) -> Result<git_hash::Kind, easy::borrow::repo::Error> {
self.repo().map(|r| r.hash_kind)
}
fn refresh_object_database(&self) -> Result<(), easy::odb::refresh::Error> {
self.repo_mut()?.deref_mut().odb.refresh()?;
Ok(())
}
}
impl<A> RepositoryAccessExt for A where A: easy::Access + Sized {}