diff --git a/src/info/mod.rs b/src/info/mod.rs index 933f0857..5e6cb01f 100644 --- a/src/info/mod.rs +++ b/src/info/mod.rs @@ -122,7 +122,6 @@ pub fn build_info(cli_options: &CliOptions) -> Result { // Having an object cache is important for getting much better traversal and diff performance. repo.object_cache_size_if_unset(4 * 1024 * 1024); let repo_path = get_work_dir(&repo)?; - let loc_by_language_sorted_handle = std::thread::spawn({ let globs_to_exclude = cli_options.info.exclude.clone(); let language_types = cli_options.info.r#type.clone(); @@ -137,19 +136,6 @@ pub fn build_info(cli_options: &CliOptions) -> Result { ) } }); - - let loc_by_language = loc_by_language_sorted_handle - .join() - .ok() - .context("BUG: panic in language statistics thread")??; - let manifest = get_manifest(&repo_path)?; - let repo_url = get_repo_url( - &repo, - cli_options.info.hide_token, - cli_options.info.http_url, - ) - .context("Failed to determine repository URL")?; - let git_metrics = traverse_commit_graph( &repo, cli_options.info.no_bots.clone(), @@ -157,11 +143,22 @@ pub fn build_info(cli_options: &CliOptions) -> Result { cli_options.info.no_merges, ) .context("Failed to traverse Git commit history")?; + let manifest = get_manifest(&repo_path)?; + let repo_url = get_repo_url( + &repo, + cli_options.info.hide_token, + cli_options.info.http_url, + ) + .context("Failed to determine repository URL")?; let true_color = match cli_options.ascii.true_color { When::Always => true, When::Never => false, When::Auto => is_truecolor_terminal(), }; + let loc_by_language = loc_by_language_sorted_handle + .join() + .ok() + .context("BUG: panic in language statistics thread")??; let dominant_language = langs::get_main_language(&loc_by_language); let ascii_colors = get_ascii_colors( cli_options.ascii.ascii_language.as_ref(), @@ -169,7 +166,6 @@ pub fn build_info(cli_options: &CliOptions) -> Result { &cli_options.ascii.ascii_colors, true_color, ); - let text_colors = TextColors::new(&cli_options.text_formatting.text_colors, ascii_colors[0]); let no_bold = cli_options.text_formatting.no_bold; let number_separator = cli_options.text_formatting.number_separator;