added index precommit hook for tests.