Git hooks available for one project but not another?

已回答

I have 2 projects open concurrently atm and I just noticed that project B, despite having a .pre-commit-config.yaml file, does not run the commit hooks. I compared profiles and the checkbox is present for project A, but not project B. I can't find any setting that would change this, nor do I remember explicitly setting it on project A. IIRC I just cloned the repo and the checks were executed.

0

Do you have hooks configured in the .git/hooks file for the second project? 

0

Hi Dino,

Sorry for the late reply, the notification got lost in my inbox.

Yes I do, I can see these:

applypatch-msg.sample  fsmonitor-watchman.sample  pre-applypatch.sample  pre-commit.sample      pre-push.sample    pre-receive.sample        update.sample
commit-msg.sample      post-update.sample      pre-commit         pre-merge-commit.sample  pre-rebase.sample  prepare-commit-msg.sample
 

Ironically, the problem seems to have fixed itself in the time that I originally posted. I didn't realise until I saw your comment.

 

Thanks anyway :)

Guus

0

请先登录再写评论。