Run git2::Repository::find_remote in the background (#44092)

We were seeing this hog the main thread.

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
This commit is contained in:
Cole Miller
2025-12-03 19:33:40 +00:00
committed by GitHub
co-authored by cameron
parent a51e975b81
commit 4ef8433396
5 changed files with 43 additions and 28 deletions
@@ -33,11 +33,11 @@ pub fn init(cx: &mut App) {
///
/// These require information from the Git repository to construct, so their
/// registration is deferred until we have a Git repository initialized.
pub fn register_additional_providers(
pub async fn register_additional_providers(
provider_registry: Arc<GitHostingProviderRegistry>,
repository: Arc<dyn GitRepository>,
) {
let Some(origin_url) = repository.remote_url("origin") else {
let Some(origin_url) = repository.remote_url("origin").await else {
return;
};