diff options
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 | }; |