git: Pass project environment to git binary invocations (#26301)

Closes #26213 

Release Notes:

- Git Beta: pass down environment variables from project to git
operations
This commit is contained in:
Cole Miller 2025-03-10 12:12:46 -04:00 committed by GitHub
parent 013a646799
commit b91e929086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 194 additions and 55 deletions

View file

@ -87,10 +87,12 @@ impl HeadlessProject {
buffer_store
});
let environment = project::ProjectEnvironment::new(&worktree_store, None, cx);
let git_store = cx.new(|cx| {
GitStore::new(
&worktree_store,
buffer_store.clone(),
Some(environment.clone()),
session.clone().into(),
None,
cx,
@ -105,7 +107,6 @@ impl HeadlessProject {
cx,
)
});
let environment = project::ProjectEnvironment::new(&worktree_store, None, cx);
let toolchain_store = cx.new(|cx| {
ToolchainStore::local(
languages.clone(),