From 09d69a374f7408ad952d13ee6cca16222d0c851c Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Mon, 30 Jan 2023 11:09:33 +0100
Subject: [PATCH] src/main.rs: add a push command

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

diff --git a/src/main.rs b/src/main.rs
index b5625b7..670c2ae 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,6 +7,7 @@ use configt::PartialPrune;
 mod checkout;
 mod commit;
 mod compact;
+mod compress;
 mod config_structure;
 mod configt;
 mod create_hooks;
@@ -100,6 +101,9 @@ enum Commands {
     /// This command can be used to add a new remote for push and pull commands
     #[clap(subcommand)]
     Remote(Remote),
+    /// This command can be used to push a repository using a remote
+    /// #[clap(subcommand)]
+    Push(Push),
 }
 
 #[derive(Debug, Args)]
@@ -294,6 +298,12 @@ struct RemoteRm {
     global: bool,
 }
 
+#[derive(Debug, Args)]
+struct Push {
+    /// The name of the remote to use
+    key: String,
+}
+
 fn main() {
     let args = Cli::parse();
 
@@ -374,5 +384,8 @@ fn main() {
             }
             Remote::Rm(e) => remote::remove_config(&e.key, e.global),
         },
+        Commands::Push(p) => {
+            compress::push(&p.key);
+        }
     }
 }
-- 
GitLab