From 56492b5079dae5674267a906c91f18fc76ac8053 Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Fri, 23 Sep 2022 16:32:10 +0200 Subject: [PATCH] src/main.rs add prune subcommand --- src/main.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e2ce197..8e4b168 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ use crate::delete::Delete; +use crate::prune::Prune; use clap::{Args, Parser, Subcommand}; mod checkout; mod commit; @@ -8,6 +9,7 @@ mod diff; mod init; mod list; mod mount; +mod prune; #[derive(Debug, Parser)] #[clap(name = "gbl")] @@ -58,10 +60,21 @@ enum Commands { Mount(Mount), /// Unmount everything in the folder .mount Umount, - /// This command delete an archive from the repository or the complete repository + /// This command deletes an archive from the repository or the complete repository /// /// This is basically a wrapper of the borg delete command + /// + /// You can visit: + /// https://borgbackup.readthedocs.io/en/stable/usage/delete.html for more details Delete(Delete), + /// This command prunes the .borg repository. This can be used to keep only + /// archive created during a given time interval + /// + /// This is basically a wrapper of the borg prune command + /// + /// You can visit: + /// https://borgbackup.readthedocs.io/en/stable/usage/prune.html for more details + Prune(Prune), } #[derive(Debug, Args)] @@ -237,5 +250,8 @@ fn main() { Commands::Delete(my_delete) => { delete::deletion_launcher(my_delete); } + Commands::Prune(my_prune) => { + prune::prune_launcher(my_prune); + } } } -- GitLab