gleisbau 0.7.3

Library to show clear git graphs arranged for your branching model
Documentation
//! gleisbau generate clear git graphs arranged for your branching model.
//!
//! The main steps are:
//! 1. Read branching model configuration (See [config] and [settings])
//! 2. Lay out the graph structure according to the branching model (See [graph])
//! 3. Render the layout to text or SVG (See [mod@print])

// Configure clippy to look for complex functions
#![warn(clippy::cognitive_complexity)]
#![warn(clippy::too_many_lines)]

pub use git2::Repository;
use std::path::Path;

pub mod config;
pub mod graph;
pub mod layout;
pub mod print;
pub mod settings;
pub mod track;

// Documentation only module,
// see https://rustprojectprimer.com/documentation/rustdoc.html
pub mod _0_7_x_refactor {
    #![doc = include_str!("../docs/refactoring.md")]
}

pub fn get_repo<P: AsRef<Path>>(
    path: P,
    skip_repo_owner_validation: bool,
) -> Result<Repository, git2::Error> {
    if skip_repo_owner_validation {
        unsafe { git2::opts::set_verify_owner_validation(false)? }
    }
    Repository::discover(path)
}