◐ Shell
clean mode source ↗

forbid-new-submodules is broken

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@m-khvoinitsky

Description

@m-khvoinitsky

The hook does not have an explicit types section.
Default types: [file] does not match submodules (which are directories). It works only if you commit some regular file together with committing new submodule.
Specifying types: [directory] helps but not much: it works as a pre-commit but doesn't as pre-push or any other way when you specify --from-ref and --to-ref.
I'd suggest stopping ignoring provided by pre-commit list of files and check git status for provided files instead of diff.

Metadata

Metadata

Labels

No fields configured for issues without a type.

Development

No branches or pull requests

Issue actions