Skip to content
代码片段 群组 项目
提交 4927c9d3 编辑于 作者: Evan Read's avatar Evan Read
浏览文件

Version branch hooks removal with tabs

上级 58de4d11
无相关合并请求
......@@ -150,16 +150,33 @@ To create a global server hook for all repositories:
If the server hook code is properly implemented, it should execute when the Git hook is next triggered. Hooks are executed in alphabetical order by filename in the hook type
subdirectories.
## Remove server hooks for a repository using Gitaly CLI
## Remove server hooks for a repository
::Tabs
:::TabTitle GitLab 15.11 and later
> [Introduced](https://gitlab.com/gitlab-org/gitaly/-/issues/4629) in GitLab 15.11, `hooks set` command replaces direct file system access.
To remove hooks using the Gitaly CLI, pass an empty tarball to `hook set` to indicate that the repository should contain no hooks. For example:
Prerequisites:
- The [storage name and relative path](repository_storage_types.md#from-project-name-to-hashed-path) for the repository.
To remove server hooks, pass an empty tarball to `hook set` to indicate that the repository should contain no hooks. For example:
```shell
cat empty_hooks.tar | gitaly hooks set --storage <storage> --repository <relative path> --config <config path>`.
```
:::TabTitle GitLab 15.10 and earlier
To remove server hooks:
1. Go to the location of the repository on disk.
1. Delete the server hooks in the `custom_hooks` directory.
::EndTabs
## Chained server hooks
GitLab can execute server hooks in a chain. GitLab searches for and executes server hooks in the following order:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册