diff --git a/src/main.rs b/src/main.rs index 9b9c55a9d6532db7805d0da106540e9a097de1df..29c4426bf2282c5ba77d708e3060717398c25e3a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ use clap::{Args, Parser, Subcommand}; +mod checkout; mod commit; mod init; mod list; @@ -24,6 +25,9 @@ enum Commands { Commit(Commit), /// List the content of the .borg archive List(List), + /// Check if a checkout can be performed without losing data + #[clap(name = "pre-co")] + PreCo, } #[derive(Debug, Args)] @@ -54,10 +58,13 @@ fn main() { init::init_repository(); } Commands::Commit(commit) => { - commit::commit(commit.compression); + commit::commit(commit.compression, String::from("")); } Commands::List(list) => { list::borg_list(list.first, list.last, &list.archive); } + Commands::PreCo => { + checkout::prepare_checkout(); + } } }