summaryrefslogtreecommitdiffstats
path: root/libimagrt
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-07-15 23:24:28 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-09-07 22:05:27 +0200
commit2562b705b811596f4eb033787cf108bbd8619411 (patch)
tree03327a1254cc5cb8ee49895fd5246ab5baca495d /libimagrt
parent010109a3c3103ae888a2db388c1a998ea4bea1fd (diff)
Add git hooks in the runtime setup code
Diffstat (limited to 'libimagrt')
-rw-r--r--libimagrt/src/runtime.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/libimagrt/src/runtime.rs b/libimagrt/src/runtime.rs
index e847631d..697bfcae 100644
--- a/libimagrt/src/runtime.rs
+++ b/libimagrt/src/runtime.rs
@@ -43,6 +43,10 @@ impl<'a> Runtime<'a> {
use libimagstore::hook::Hook;
use libimagstore::error::StoreErrorKind;
use libimagstorestdhook::debug::DebugHook;
+ use libimagstorestdhook::vcs::git::create::CreateHook as GitCreateHook;
+ use libimagstorestdhook::vcs::git::delete::DeleteHook as GitDeleteHook;
+ use libimagstorestdhook::vcs::git::retrieve::RetrieveHook as GitRetrieveHook;
+ use libimagstorestdhook::vcs::git::update::UpdateHook as GitUpdateHook;
use libimagerror::trace::trace_error;
use libimagerror::trace::trace_error_dbg;
use libimagerror::into::IntoError;
@@ -119,6 +123,11 @@ impl<'a> Runtime<'a> {
(Box::new(DebugHook::new(HP::PostUpdate)) , "debug", HP::PostUpdate),
(Box::new(DebugHook::new(HP::PreDelete)) , "debug", HP::PreDelete),
(Box::new(DebugHook::new(HP::PostDelete)) , "debug", HP::PostDelete),
+
+ (Box::new(GitCreateHook::new(HP::PostCreate)) , "vcs", HP::PostCreate),
+ (Box::new(GitDeleteHook::new(HP::PreDelete)) , "vcs", HP::PreDelete),
+ (Box::new(GitRetrieveHook::new(HP::PostRetrieve)) , "vcs", HP::PostRetrieve),
+ (Box::new(GitUpdateHook::new(HP::PostUpdate)) , "vcs", HP::PostUpdate),
];
// If hook registration fails, trace the error and warn, but continue.