From b7da81e21db8a8ede4443bd2a2f41b0a5467afb0 Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Tue, 31 Jan 2023 13:21:25 +0100
Subject: [PATCH] src/main.rs: add push and pull commands

---
 src/main.rs | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index c7b9a6e..b103ce8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,7 +7,6 @@ use configt::PartialPrune;
 mod checkout;
 mod commit;
 mod compact;
-mod push;
 mod config_structure;
 mod configt;
 mod create_hooks;
@@ -17,6 +16,8 @@ mod init;
 mod list;
 mod mount;
 mod prune;
+mod pull;
+mod push;
 mod remote;
 
 #[derive(Debug, Parser)]
@@ -102,8 +103,9 @@ enum Commands {
     #[clap(subcommand)]
     Remote(Remote),
     /// This command can be used to push a repository using a remote
-    /// #[clap(subcommand)]
     Push(Push),
+    /// This command can be used to pull a repository using a remote
+    Pull(Pull),
 }
 
 #[derive(Debug, Args)]
@@ -304,6 +306,12 @@ struct Push {
     key: String,
 }
 
+#[derive(Debug, Args)]
+struct Pull {
+    /// The name of the remote to use
+    key: String,
+}
+
 fn main() {
     let args = Cli::parse();
 
@@ -387,5 +395,8 @@ fn main() {
         Commands::Push(p) => {
             push::push(&p.key);
         }
+        Commands::Pull(p) => {
+            pull::pull(&p.key);
+        }
     }
 }
-- 
GitLab