If GIT_ASKPASS is already set, assume it will do the right thing (#27681)

Fixes running git push on a coder instance.

Closes #ISSUE

Release Notes:

- Zed will now use `GIT_ASKPASS` if you already have one set instead of
overriding with our own. Fixes `git push` in Coder.
This commit is contained in:
Conrad Irwin 2025-03-28 14:50:05 -06:00 committed by GitHub
parent 4da987dad4
commit 4a5c492188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 44 deletions

View file

@ -5,8 +5,8 @@ use futures::future::{self, BoxFuture};
use git::{
blame::Blame,
repository::{
AskPassSession, Branch, CommitDetails, GitRepository, GitRepositoryCheckpoint, PushOptions,
Remote, RepoPath, ResetMode,
AskPassDelegate, Branch, CommitDetails, GitRepository, GitRepositoryCheckpoint,
PushOptions, Remote, RepoPath, ResetMode,
},
status::{FileStatus, GitStatus, StatusCode, TrackedStatus, UnmergedStatus},
};
@ -370,7 +370,7 @@ impl GitRepository for FakeGitRepository {
_branch: String,
_remote: String,
_options: Option<PushOptions>,
_askpass: AskPassSession,
_askpass: AskPassDelegate,
_env: HashMap<String, String>,
_cx: AsyncApp,
) -> BoxFuture<Result<git::repository::RemoteCommandOutput>> {
@ -381,7 +381,7 @@ impl GitRepository for FakeGitRepository {
&self,
_branch: String,
_remote: String,
_askpass: AskPassSession,
_askpass: AskPassDelegate,
_env: HashMap<String, String>,
_cx: AsyncApp,
) -> BoxFuture<Result<git::repository::RemoteCommandOutput>> {
@ -390,7 +390,7 @@ impl GitRepository for FakeGitRepository {
fn fetch(
&self,
_askpass: AskPassSession,
_askpass: AskPassDelegate,
_env: HashMap<String, String>,
_cx: AsyncApp,
) -> BoxFuture<Result<git::repository::RemoteCommandOutput>> {