diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-02 14:37:14 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-05 21:30:59 +0100 |
| commit | a744f4aae9ffee9dd246090bef486b09433778d0 (patch) | |
| tree | 5d1083668ec989d1fc8529a7ece60dc2bd4ec594 /src/bin/ngit/sub_commands/init.rs | |
| parent | 0f3969325385f2707e359cb28d9c49c509310452 (diff) | |
chore: nix flake update
update nix dependancies to latest version using default update options
run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
Diffstat (limited to 'src/bin/ngit/sub_commands/init.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/init.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index 9c544d6..3c58a52 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs | |||
| @@ -70,21 +70,11 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 70 | 70 | ||
| 71 | let mut client = Client::default(); | 71 | let mut client = Client::default(); |
| 72 | 72 | ||
| 73 | let repo_coordinate = if let Ok(repo_coordinate) = | 73 | let repo_coordinate = (try_and_get_repo_coordinates_when_remote_unknown(&git_repo).await).ok(); |
| 74 | try_and_get_repo_coordinates_when_remote_unknown(&git_repo).await | ||
| 75 | { | ||
| 76 | Some(repo_coordinate) | ||
| 77 | } else { | ||
| 78 | None | ||
| 79 | }; | ||
| 80 | 74 | ||
| 81 | let repo_ref = if let Some(repo_coordinate) = &repo_coordinate { | 75 | let repo_ref = if let Some(repo_coordinate) = &repo_coordinate { |
| 82 | fetching_with_report(git_repo_path, &client, repo_coordinate).await?; | 76 | fetching_with_report(git_repo_path, &client, repo_coordinate).await?; |
| 83 | if let Ok(repo_ref) = get_repo_ref_from_cache(Some(git_repo_path), repo_coordinate).await { | 77 | (get_repo_ref_from_cache(Some(git_repo_path), repo_coordinate).await).ok() |
| 84 | Some(repo_ref) | ||
| 85 | } else { | ||
| 86 | None | ||
| 87 | } | ||
| 88 | } else { | 78 | } else { |
| 89 | None | 79 | None |
| 90 | }; | 80 | }; |