git: Handle git pre-commit hooks separately (#43285)
We now run git pre-commit hooks before we commit. This ensures we don't run into timeout issues with askpass delegate and report invalid error to the user. Closes #43157 Release Notes: - Fixed long running pre-commit hooks causing committing from Zed to fail. Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
co-authored by
Cole Miller
parent
279b76d440
commit
d07193cdf2
@@ -3,7 +3,7 @@ use anyhow::{Context as _, Result, bail};
|
||||
use collections::{HashMap, HashSet};
|
||||
use futures::future::{self, BoxFuture, join_all};
|
||||
use git::{
|
||||
Oid,
|
||||
Oid, RunHook,
|
||||
blame::Blame,
|
||||
repository::{
|
||||
AskPassDelegate, Branch, CommitDetails, CommitOptions, FetchOptions, GitRepository,
|
||||
@@ -532,6 +532,14 @@ impl GitRepository for FakeGitRepository {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn run_hook(
|
||||
&self,
|
||||
_hook: RunHook,
|
||||
_env: Arc<HashMap<String, String>>,
|
||||
) -> BoxFuture<'_, Result<()>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn push(
|
||||
&self,
|
||||
_branch: String,
|
||||
|
||||
Reference in New Issue
Block a user