From 0c79ba22dec94b10805181fa51a5007549d21252 Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Wed, 11 May 2022 10:58:20 +0200 Subject: [PATCH] src/main.rs: add pre-co command --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9b9c55a..29c4426 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(); + } } } -- GitLab