Git on main thread (#26573)

This moves spawning of the git subprocess to the main thread. We're not
yet
sure why, but when we spawn a process using GCD's background queues,
sub-processes like git-credential-manager fail to open windows.

This seems to be fixable either by using the main thread, or by using a
standard background thread,
but for now we use the main thread.


Release Notes:

- Git: Fix git-credential-manager

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
Conrad Irwin 2025-03-12 13:39:30 -06:00 committed by GitHub
parent 5268e74315
commit 7bca15704b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 926 additions and 713 deletions

View file

@ -1361,7 +1361,7 @@ async fn test_remote_git_branches(cx: &mut TestAppContext, server_cx: &mut TestA
assert_eq!(&remote_branches, &branches_set);
cx.update(|cx| repository.read(cx).change_branch(new_branch))
cx.update(|cx| repository.read(cx).change_branch(new_branch.to_string()))
.await
.unwrap()
.unwrap();
@ -1383,15 +1383,23 @@ async fn test_remote_git_branches(cx: &mut TestAppContext, server_cx: &mut TestA
assert_eq!(server_branch.name, branches[2]);
// Also try creating a new branch
cx.update(|cx| repository.read(cx).create_branch("totally-new-branch"))
.await
.unwrap()
.unwrap();
cx.update(|cx| {
repository
.read(cx)
.create_branch("totally-new-branch".to_string())
})
.await
.unwrap()
.unwrap();
cx.update(|cx| repository.read(cx).change_branch("totally-new-branch"))
.await
.unwrap()
.unwrap();
cx.update(|cx| {
repository
.read(cx)
.change_branch("totally-new-branch".to_string())
})
.await
.unwrap()
.unwrap();
cx.run_until_parked();