Docs feedback: Custom Git hooks should include instructions for use with hashed storage
I noticed that our doc on Custom server-side Git hooks provides paths for project data that don't account for customers using hashed storage.
For example, on an Omnibus installation, it instructs the user to create their custom_hooks
directory in /var/opt/gitlab/git-data/repositories/<group>/<project>.git
. With the introduction of hashed storage in v10.0, the actual project directory would likely be something like this:
/var/opt/gitlab/git-data/repositories/@hashed/96/06/96061e92f58e4bdcdee73df36183fe3ac64747c81c26f6c83aada8d2aabb1864.git
.
Since the project directory doesn't include a namespace or any other identifying info, it could be difficult to find out where to put these custom hooks without updated instructions. The method I used to find the hashed path was to open up a Rails console and run:
Project.find_by_full_path('group/project').repository.path
(substituting the proper group and project of course)
This Rails command provides the full hashed path, so I'd recommend including it in the doc to help users find where to put their custom_hooks
directory.