diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-09-11 10:02:09 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-09-11 10:02:09 +0100 |
| commit | 73d2c39abe3a1a7f67f0809380bf4c525cf1e1f2 (patch) | |
| tree | 0d10bdcc4f181273f0929a821a765cb7e90dceff /src/bin/ngit | |
| parent | 2d9bfb816693947e1fb1ae4688d3c75aa9ab7ca1 (diff) | |
fix: ngit binary enforce git server timeout
rather than just in the remote helper.
Diffstat (limited to 'src/bin/ngit')
| -rw-r--r-- | src/bin/ngit/main.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index f07203a..71b6e85 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs | |||
| @@ -7,7 +7,11 @@ use clap::Parser; | |||
| 7 | use cli::{AccountCommands, CUSTOMISE_TEMPLATE, Cli, Commands}; | 7 | use cli::{AccountCommands, CUSTOMISE_TEMPLATE, Cli, Commands}; |
| 8 | 8 | ||
| 9 | mod cli; | 9 | mod cli; |
| 10 | use ngit::{cli_interactor, client, git, git_events, login, repo_ref}; | 10 | use ngit::{ |
| 11 | cli_interactor, client, | ||
| 12 | git::{self, utils::set_git_timeout}, | ||
| 13 | git_events, login, repo_ref, | ||
| 14 | }; | ||
| 11 | 15 | ||
| 12 | mod sub_commands; | 16 | mod sub_commands; |
| 13 | 17 | ||
| @@ -20,6 +24,8 @@ async fn main() -> Result<()> { | |||
| 20 | std::process::exit(0); // Exit the program | 24 | std::process::exit(0); // Exit the program |
| 21 | } | 25 | } |
| 22 | 26 | ||
| 27 | let _ = set_git_timeout(); | ||
| 28 | |||
| 23 | if let Some(command) = &cli.command { | 29 | if let Some(command) = &cli.command { |
| 24 | match command { | 30 | match command { |
| 25 | Commands::Account(args) => match &args.account_command { | 31 | Commands::Account(args) => match &args.account_command { |