From 2e4edbae5ce9e64ed7ebf30cbd8b6f2df593e4ac Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Tue, 7 May 2024 16:50:18 +0200
Subject: [PATCH] src/main.rs: update pull fonction

---
 src/main.rs | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 8181e06..f82057a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -339,6 +339,12 @@ struct Push {
 struct Pull {
     /// The name of the remote to use
     key: String,
+    /// The name of the archive to pull
+    archive: Option<String>,
+    /// An option indicating to download all archive not already present
+    /// in .borg folder
+    #[clap(short, long, takes_value = false)]
+    all: bool,
 }
 
 #[derive(Debug, Args)]
@@ -446,9 +452,8 @@ fn main() {
             mount::umount_archive(true);
             push::push(&p.key, &p.archive, &p.compression);
         }
-        Commands::Pull(_) => {
-            // pull::pull(&p.key);
-            eprintln!("function disabled");
+        Commands::Pull(p) => {
+            pull::pull(&p.key, &p.archive, p.all);
         }
         Commands::Clean => {
             clean::clean();
-- 
GitLab