1 2 3 4 5 6 7 8 9 10 11 12 13
use gobbledygit::{head_status, repo, status}; use std::process::exit; fn main() { match repo() { Some(r) => { let res = format!("[{}] {}", head_status(&r), status(&r)); print!("{}", res.trim()); } None => exit(0), //No repo found! } }