git: Use environment from login shell to search for system git binary, and prefer it to the bundled binary (#39302)

Closes #38571

Release Notes:

- git: Fixed git features not working when git was installed in an
unusual location.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
This commit is contained in:
Cole Miller
2025-10-02 14:22:10 -04:00
committed by GitHub
co-authored by Lukas Wirth
parent dbd8efe129
commit af630be7ca
5 changed files with 112 additions and 54 deletions
+3 -1
View File
@@ -7797,7 +7797,9 @@ async fn test_staging_random_hunks(
path!("/dir/.git").as_ref(),
&[("file.txt", index_text.clone())],
);
let repo = fs.open_repo(path!("/dir/.git").as_ref()).unwrap();
let repo = fs
.open_repo(path!("/dir/.git").as_ref(), Some("git".as_ref()))
.unwrap();
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
let buffer = project