Question

Recently I migrated from opensuse to centos and after that GIT has started to ignore my custom commit-msg hook. It simply doesn't execute it. (I checked it by add small piece of code to "add_ChangeId" function )

  • Hook generates Change-Id hash for every commit
  • GIT version: 1.8.1.2
  • File is located in following location: .git/hooks/
  • For debugging purposes I even have set 0777 permissions to the whole .git directory

Here is the full text of commit-msg file - http://pastebin.com/zmYNi0ED

Was it helpful?

Solution

timoras you are gold. Then I tried to execute script using sh .git/hooks/scriptname it worked, but when tried to call it using .git/hooks/scriptname and shell returned that I haven't permissions to execute it.

After that I looked at fstab, and found out that have forgot to add exec flag to the partition where this file was located.

Now everything works.

One more time thanks timoras!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top