Reputation: 10203
I have a git repo with a couple of submodules whose code contents are out of my control. I would like to ignore these submodules in all pre-commit hooks. Is there any way of achieving this short of manually specifying the folders in which these submodules reside for every individual hook?
Upvotes: 1
Views: 1453
Reputation: 69914
submodules should be ignored by default -- they get a special type
tag of submodule
which usually doesn't go through the normal git hooks (which by default have a filter of [file]
).
my guess is your configuration escapes the normal way of using hooks and does something like flake8 .
-- in which case you should switch to filename-based hooks. It's impossible to know without seeing your configuration though so please share that with an edit
disclaimer: I'm the creator of pre-commit
Upvotes: 1