My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/apps/servers/octopus/supergit/src/bin/test.rs

23 lines
584 B

//! A test binary to use during development
use supergit::raw::RawRepository;
fn main() {
let path = match std::env::args().nth(1) {
Some(p) => p,
None => {
eprintln!("USAGE: supergit-test <path>");
std::process::exit(2);
}
};
let rr = RawRepository::open(path.as_str()).unwrap();
let branches = rr.parse_branches().unwrap();
for branch in branches {
if branch.name.as_str() != "main" && continue {}
println!("Branch: {}", branch.name);
branch.enumerate(" ".into(), &rr.inner);
}
}