upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit/main.rs')
-rw-r--r--src/bin/ngit/main.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs
index cdd0e97..a49267b 100644
--- a/src/bin/ngit/main.rs
+++ b/src/bin/ngit/main.rs
@@ -4,7 +4,7 @@
4 4
5use anyhow::Result; 5use anyhow::Result;
6use clap::Parser; 6use clap::Parser;
7use cli::{Cli, Commands}; 7use cli::{AccountCommands, Cli, Commands};
8 8
9mod cli; 9mod cli;
10use ngit::{cli_interactor, client, git, git_events, login, repo_ref}; 10use ngit::{cli_interactor, client, git, git_events, login, repo_ref};
@@ -15,14 +15,16 @@ mod sub_commands;
15async fn main() -> Result<()> { 15async fn main() -> Result<()> {
16 let cli = Cli::parse(); 16 let cli = Cli::parse();
17 match &cli.command { 17 match &cli.command {
18 Commands::Account(args) => match &args.account_command {
19 AccountCommands::Login(sub_args) => sub_commands::login::launch(&cli, sub_args).await,
20 AccountCommands::Logout => sub_commands::logout::launch().await,
21 AccountCommands::ExportKeys => sub_commands::export_keys::launch().await,
22 },
18 Commands::Fetch(args) => sub_commands::fetch::launch(&cli, args).await, 23 Commands::Fetch(args) => sub_commands::fetch::launch(&cli, args).await,
19 Commands::Login(args) => sub_commands::login::launch(&cli, args).await,
20 Commands::Logout => sub_commands::logout::launch().await,
21 Commands::Init(args) => sub_commands::init::launch(&cli, args).await, 24 Commands::Init(args) => sub_commands::init::launch(&cli, args).await,
22 Commands::ExportKeys => sub_commands::export_keys::launch().await,
23 Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await,
24 Commands::List => sub_commands::list::launch().await, 25 Commands::List => sub_commands::list::launch().await,
25 Commands::Pull => sub_commands::pull::launch().await, 26 Commands::Pull => sub_commands::pull::launch().await,
26 Commands::Push(args) => sub_commands::push::launch(&cli, args).await, 27 Commands::Push(args) => sub_commands::push::launch(&cli, args).await,
28 Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await,
27 } 29 }
28} 30}