use std::path::Path;
use crate::git_gamble::gamble_result::GambleResult;
use crate::git_gamble::repository::Repository;
use super::cli::SubCommandHook;
pub fn handle_hook(repository_path: &Path, hook_options: &SubCommandHook) -> GambleResult<()> {
let repository = Repository::new(repository_path, false, false);
match hook_options {
SubCommandHook::Enable { hook } => repository.enable_hook(hook),
SubCommandHook::Disable { hook } => repository.disable_hook(hook),
}
}