diff --git a/crates/git/src/repository.rs b/crates/git/src/repository.rs index 6477917dcdc485a5f2d23f16f3a5b3d7f94e9597..9f77ddc7cfc8e9e8d4ebca836e12f86496dc7c0b 100644 --- a/crates/git/src/repository.rs +++ b/crates/git/src/repository.rs @@ -2318,6 +2318,7 @@ impl GitRepository for RealGitRepository { let executor = self.executor.clone(); let help_output = self.any_git_binary_help_output(); + // Note: Do not spawn these commands on the background thread, as this causes some git hooks to hang. async move { let working_directory = working_directory?; if !help_output @@ -2327,14 +2328,10 @@ impl GitRepository for RealGitRepository { { let hook_abs_path = repository.lock().path().join("hooks").join(hook.as_str()); if hook_abs_path.is_file() { - let output = self - .executor - .spawn( - new_smol_command(&hook_abs_path) - .envs(env.iter()) - .current_dir(&working_directory) - .output(), - ) + let output = new_smol_command(&hook_abs_path) + .envs(env.iter()) + .current_dir(&working_directory) + .output() .await?; if !output.status.success() {