From 57fbeb54e75c9e1bb589ec7f087212aa2df49ac1 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 22 Jul 2016 14:47:52 +0200 Subject: [PATCH] Add Runtime::repository() --- libimagstorestdhook/src/vcs/git/runtime.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libimagstorestdhook/src/vcs/git/runtime.rs b/libimagstorestdhook/src/vcs/git/runtime.rs index 44255613..663c1d2e 100644 --- a/libimagstorestdhook/src/vcs/git/runtime.rs +++ b/libimagstorestdhook/src/vcs/git/runtime.rs @@ -65,5 +65,9 @@ impl<'a> Runtime<'a> { }) } + pub fn repository(&self) -> Result<&Repository> { + self.repository.as_ref().ok_or(GHEK::MkRepo.into_error()) + } + }