Skip to content
Snippets Groups Projects
Verified Commit 243ebc25 authored by nfontrod's avatar nfontrod
Browse files

src/main.rs: update main.rs function

parent 13c70c37
No related branches found
No related tags found
No related merge requests found
......@@ -336,6 +336,21 @@ struct Pull {
struct Clone {
/// The path pointing to a borg folder
path: String,
/// If specified, hooks are created inside `.git/hooks repository`
#[clap(takes_value = false, short = 'H', long)]
hooks: bool,
/// The compression to use automatically at each commit if hooks are created
#[clap(short, long, default_value = "lz4", value_name = "COMPRESSION")]
compression: String,
/// The checkout mode used by gblk automatically after a git checkout: soft or hard.
/// This option is only used if hooks are created.
/// The hard mode will delete every file in your results folder and extract
/// those corresponding to the commit targeted by the checkout.
///
/// The soft mode will only update files that existed in the targeted checkout
#[clap(short, long, default_value = "hard", value_name = "MODE")]
mode: String,
}
fn main() {
......@@ -431,7 +446,7 @@ fn main() {
restore::restore();
}
Commands::Clone(c) => {
clone::clone(&c.path);
clone::clone(&c.path, c.hooks, &c.compression, &c.mode);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment