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:
Jakub Konka
2025-11-22 00:33:32 +01:00
committed by GitHub
co-authored by Cole Miller
parent 279b76d440
commit d07193cdf2
8 changed files with 128 additions and 5 deletions
+3
View File
@@ -49,6 +49,7 @@ messages!(
(ChannelMessageUpdate, Foreground),
(CloseBuffer, Foreground),
(Commit, Background),
(RunGitHook, Background),
(CopyProjectEntry, Foreground),
(CreateBufferForPeer, Foreground),
(CreateImageForPeer, Foreground),
@@ -349,6 +350,7 @@ request_messages!(
(Call, Ack),
(CancelCall, Ack),
(Commit, Ack),
(RunGitHook, Ack),
(CopyProjectEntry, ProjectEntryResponse),
(CreateChannel, CreateChannelResponse),
(CreateProjectEntry, ProjectEntryResponse),
@@ -547,6 +549,7 @@ entity_messages!(
BufferSaved,
CloseBuffer,
Commit,
RunGitHook,
GetColorPresentation,
CopyProjectEntry,
CreateBufferForPeer,