gitwig 2.4.11

a rust based tui, an alternative to sourcetree and gitui
1
2
3
4
5
6
7
8
9
10
11
12
use std::path::PathBuf;

fn main() {
    let path = PathBuf::from("/Users/tareqmy/development/rustprojects/gitwig/target/checkout/.git/HEAD");
    let excludes = vec!["node_modules".to_string(), "target".to_string(), "checkout".to_string()];
    
    let is_excluded = excludes
        .iter()
        .any(|ex| path.components().any(|c| c.as_os_str() == ex.as_str()));
        
    println!("is_excluded: {}", is_excluded);
}