# git: Fix git hook hang with \`prek\` \(\#44212\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7ed5d42696e338b76b24a583e213bb6390f18316)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7ed5d42696e338b76b24a583e213bb6390f18316

Requested commit: 7ed5d42696e338b76b24a583e213bb6390f18316

Commit: 7ed5d42696e338b76b24a583e213bb6390f18316

Tree: 2916164390aa1e025274304a1bfefbed2c0d349a

Author: CharlesChen0823

Committer: GitHub

## Message

```
git: Fix git hook hang with `prek` (#44212)

Fix git hook hang when using with `prek`. Can see
[comments](https://github.com/zed-industries/zed/issues/44057#issuecomment-3606837089),
this is easy test, should using release build, debug build sometimes not
hang.

The issue existing long time, see issue #37293 , and then in commit
#42239 this issue had fixed. but in commit #43285 broken again. So I
reference the implementation in #42239, then this code work.

I MUST CLAIM, I really don't known what happend, and why this code work.
But it worked.

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
```

## Parents

- [25d74480aac797ec38a60aed46d055d69767e8cc](https://git.cafe/gitcafe/zed/commit/25d74480aac797ec38a60aed46d055d69767e8cc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7ed5d42696e338b76b24a583e213bb6390f18316?format=markdown)
