diff options
Diffstat (limited to 'apps/servers/octopus/supergit/src/bin/test.rs')
-rw-r--r-- | apps/servers/octopus/supergit/src/bin/test.rs | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/apps/servers/octopus/supergit/src/bin/test.rs b/apps/servers/octopus/supergit/src/bin/test.rs index 6b9a67b75813..78367ea2c6bc 100644 --- a/apps/servers/octopus/supergit/src/bin/test.rs +++ b/apps/servers/octopus/supergit/src/bin/test.rs @@ -1,33 +1,38 @@ //! A test binary to use during development -use std::sync::mpsc::channel; -use supergit::{BranchCommit, Repository}; +// use std::sync::mpsc::channel; +// use supergit::{BranchCommit, Repository}; -fn main() { - let path = match std::env::args().nth(1) { - Some(p) => p, - None => { - eprintln!("USAGE: supergit-test <path>"); - std::process::exit(2); - } - }; +// fn main() { +// let path = match std::env::args().nth(1) { +// Some(p) => p, +// None => { +// eprintln!("USAGE: supergit-test <path>"); +// std::process::exit(2); +// } +// }; + +// let repo = Repository::open(path.as_str()).unwrap(); +// let branches = repo.branches().unwrap(); +// let main = branches +// .into_iter() +// .filter(|b| b.name() == Some("master".to_string())) +// .nth(0) +// .unwrap(); - let repo = Repository::open(path.as_str()).unwrap(); - let branches = repo.branches().unwrap(); - let main = branches - .into_iter() - .filter(|b| b.name() == Some("master".to_string())) - .nth(0) - .unwrap(); +// let head = main.get_head(); +// let tree = head.get_tree(); + +// println!( +// "{:#?}", +// tree.history(main.get_all(), "Cargo.toml") +// .into_iter() +// .map(|c| c.summary()) +// .collect::<Vec<_>>() +// ); +// } - let head = main.get_head(); - let tree = head.get_tree(); + +fn main() { - println!( - "{:#?}", - tree.history(main.get_all(), "Cargo.toml") - .into_iter() - .map(|c| c.summary()) - .collect::<Vec<_>>() - ); } |