Loading git-hooks +18 −1 Original line number Diff line number Diff line Loading @@ -80,12 +80,17 @@ cmd_init () done } _add_remove_check () _basic_check () { contains "$HOOKS" "$hook" || die "unknown hook '$hook'" [ -d "$GIT_DIR"/hooks/$hook.d ] || \ die "the '$hook' hook directory does not appear to exist, you should \ run 'git-hooks init'" } _add_remove_check () { _basic_check [ -w "$GIT_DIR"/hooks/$hook.d ] || \ die "you do not have permissions to add the script to \ $GIT_DIR/hooks/$hook.d" Loading Loading @@ -123,6 +128,18 @@ cmd_remove () rm "$GIT_DIR"/hooks/$hook.d/"$script" } cmd_installed () { summary="show scripts installed under a hook" local hook add_option hook yes parse_args "$@" || return _basic_check cd "$GIT_DIR"/hooks/$hook.d find -type f -printf '%P\n' } cmd_help () { summary="show this help message" Loading Loading
git-hooks +18 −1 Original line number Diff line number Diff line Loading @@ -80,12 +80,17 @@ cmd_init () done } _add_remove_check () _basic_check () { contains "$HOOKS" "$hook" || die "unknown hook '$hook'" [ -d "$GIT_DIR"/hooks/$hook.d ] || \ die "the '$hook' hook directory does not appear to exist, you should \ run 'git-hooks init'" } _add_remove_check () { _basic_check [ -w "$GIT_DIR"/hooks/$hook.d ] || \ die "you do not have permissions to add the script to \ $GIT_DIR/hooks/$hook.d" Loading Loading @@ -123,6 +128,18 @@ cmd_remove () rm "$GIT_DIR"/hooks/$hook.d/"$script" } cmd_installed () { summary="show scripts installed under a hook" local hook add_option hook yes parse_args "$@" || return _basic_check cd "$GIT_DIR"/hooks/$hook.d find -type f -printf '%P\n' } cmd_help () { summary="show this help message" Loading