Ulli T
Ulli T

Reputation: 155

TortoiseGit: Start Commit Hook not executed if "Run for this repository" is checked

I just started using Git with the TortoiseGit 2.8.0.0 client on Windows 10 and was trying to set up some client-side hooks. I would like to set them up in a way so that they are automatically set when I or my colleagues clone the repo so I checked "Run for this repository".

I noticed that the Start-commit Hook isn't being executed in that case. Pre-commit and Post-commit seem to work as expected.

If I provide the working tree path and don't check "Run for this repository" all scripts also run as expected.

For testing I just set the same script for all 3 hooks to see if they are working. My .tgitconfig looks like this:

[hook "startcommit"]
    cmdline = %root%\\ARM\\start_commit.bat
    wait = true
    show = false
[hook "postcommit"]
    cmdline = %root%\\ARM\\start_commit.bat
    wait = true
    show = false
[hook "precommit"]
    cmdline = %root%\\ARM\\start_commit.bat
    wait = true
    show = false

Can anyone explain this behaviour and how to fix it? am I missing something here?

Upvotes: 2

Views: 832

Answers (1)

MrTux
MrTux

Reputation: 33993

That's a reproducible bug which will be fixed with the next (preview) release (version >= 2.8.4 are fixed).

There is no workaround, but to define it with a repository path, too.

Upvotes: 1

Related Questions