# Pre-commit hook does not work properly in recent version

2 messages from 2018-12-13 to 2018-12-13. Participants: Andrew Kharchenko, Johannes Schindelin.
Thread: https://gitlist.dev/t/50027

## Andrew Kharchenko, 2018-12-13 15:03

Subject: Pre-commit hook does not work properly in recent version
Message-ID: <678FE577-1708-4B7A-8EE6-EBE2514A4D04@gmail.com>
URL: https://gitlist.dev/e/678FE577-1708-4B7A-8EE6-EBE2514A4D04%40gmail.com

```
Hello,

I found a bug in Git v. 2.20.0 and 2.19.x at least, where pre-commit hook does not work properly.

OS: macOS High Sierra
Git: 2.20.0, 2.19.x

Description: pre-commit file should be marked as executable in order to recreate the bug. When executing “git commit”, it silently exits without any message.
It was found, that Git version 2.17.1 still works as expected.

—
Sincerely, 
Andrew Kharchenko
```

## Johannes Schindelin, 2018-12-13 19:19

Subject: Re: Pre-commit hook does not work properly in recent version
Message-ID: <nycvar.QRO.7.76.6.1812132018170.43@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1812132018170.43%40tvgsbejvaqbjf.bet
In-Reply-To: <678FE577-1708-4B7A-8EE6-EBE2514A4D04@gmail.com>

```
Hi Andrew,

On Thu, 13 Dec 2018, Andrew Kharchenko wrote:

> I found a bug in Git v. 2.20.0 and 2.19.x at least, where pre-commit hook does not work properly.
> 
> OS: macOS High Sierra
> Git: 2.20.0, 2.19.x
> 
> Description: pre-commit file should be marked as executable in order to recreate the bug. When executing “git commit”, it silently exits without any message.
> It was found, that Git version 2.17.1 still works as expected.

Have you dug deeper? Like, add a `set -x` at the beginning of that hook to
find out why it is exiting early?

Ciao,
Johannes
```
