From 2562b705b811596f4eb033787cf108bbd8619411 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 15 Jul 2016 23:24:28 +0200 Subject: [PATCH] Add git hooks in the runtime setup code --- libimagrt/src/runtime.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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.