diff --git a/src/main.rs b/src/main.rs index 70652e16ec969ba920b308ab3cb06a293bdce3ee..6e717c9bcbb1720c9352267175dae3652117ac68 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); } } }