bgit 0.4.2

User-friendly Git wrapper for beginners, automating essential tasks like adding, committing, and pushing changes. It includes smart rules to avoid common pitfalls, such as accidentally adding sensitive files or directories and has exclusive support for portable hooks!
1
2
3
4
5
6
7
8
9
10
11
12
use crate::bgit_error::{BGitError, BGitErrorWorkflowType, NO_RULE, NO_STEP};

pub fn create_hook_error(message: &str, details: &str, event_name: &str) -> Box<BGitError> {
    Box::new(BGitError::new(
        message,
        &format!("{details}\nTo debug, run bgit with -vvv flag"),
        BGitErrorWorkflowType::HookExecutor,
        NO_STEP,
        event_name,
        NO_RULE,
    ))
}