Skip to content
Snippets Groups Projects
Commit 0c79ba22 authored by nfontrod's avatar nfontrod
Browse files

src/main.rs: add pre-co command

parent d3a8d2da
Branches
Tags
No related merge requests found
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();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment