cocogitto icon indicating copy to clipboard operation
cocogitto copied to clipboard

Add the possibility to install git hooks on git submodules

Open eburghar opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. Generally .git on a submodule is not a directory (although it can be) but a file containing the path of the directory (inside .git/modules). Launching cog install-hook -a in that case returns an error (Error: Not a directory (os error 20)).

Describe the solution you'd like Handle the hook installations when .git is a file, and also add a --recurse switch to install-hook command for installing all submodules hooks that have a cog.toml file.

Describe alternatives you've considered move the directory from .git/submodules/xxx to xxx/.git or make a symlink.

Additional context

eburghar avatar Dec 20 '23 09:12 eburghar