aboutsummaryrefslogtreecommitdiff
path: root/apps/servers/octopus/supergit/src/bin/test.rs
blob: 3b5fad9462cf1f9169392c834b18ca1fad473ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//! 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);
    }
}