Pass store path to git hooks, so we can initialize properly
This commit is contained in:
parent
7776e95345
commit
f0404d91e8
1 changed files with 5 additions and 5 deletions
|
@ -111,7 +111,7 @@ impl<'a> Runtime<'a> {
|
|||
write!(stderr(), "Store-config: {:?}\n", store_config).ok();
|
||||
}
|
||||
|
||||
Store::new(storepath, store_config).map(|mut store| {
|
||||
Store::new(storepath.clone(), store_config).map(|mut store| {
|
||||
// If we are debugging, generate hooks for all positions
|
||||
if is_debugging {
|
||||
let hooks : Vec<(Box<Hook>, &str, HP)> = vec![
|
||||
|
@ -124,10 +124,10 @@ impl<'a> Runtime<'a> {
|
|||
(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),
|
||||
(Box::new(GitCreateHook::new(&storepath, HP::PostCreate)) , "vcs", HP::PostCreate),
|
||||
(Box::new(GitDeleteHook::new(&storepath, HP::PreDelete)) , "vcs", HP::PreDelete),
|
||||
(Box::new(GitRetrieveHook::new(&storepath, HP::PostRetrieve)), "vcs", HP::PostRetrieve),
|
||||
(Box::new(GitUpdateHook::new(&storepath, HP::PostUpdate)) , "vcs", HP::PostUpdate),
|
||||
];
|
||||
|
||||
// If hook registration fails, trace the error and warn, but continue.
|
||||
|
|
Loading…
Reference in a new issue