icefox/git-hooks — pull request #16 by titpetric (2013-05-03 08:35:40+00:00)
Title: Exclude submodule '.git/' in list_hooks_in_dir

Scenario:

I'm using several git repositories which all belong to one project. Having duplicated hooks in each one of them is not an option, since I'd have to manage them all. Having a central git_hooks repository and just adding it as a submodule to each of the project repositories is a good way to keep the git_hooks/ and other locations central.

Problem:

Running git-hooks lists several files under the clean .git folder, thinking they are hooks to be added to the repository. This is incorrect.

Fix:

Exclude paths with `/.git/` in them.