Importing repositories from gitolite fails to setup gitlab specific hooks
Created by: walterra
Summary
Using 5-3-stable and this guide I imported repositories from a previous gitolite setup.
The import went without errors, but moving on we didn't see pushes showing up in GitLab's home stream regarding the imported repositories. Additionally newly pushed branches didn't show up in the commit-branches-dropdown, but they were present in the branches tab.
Steps to reproduce
- Use 5-3-stable and this guide to import repositories from a previous gitolite setup.
- a) Checkout and push back changes to gitlab or b) Checkout, create a new branch and push back to gitlab
Expected bevahior
- pushed commits should show up in home stream as notifications
- pushed new branches should show up in homestream and commit-branch-dropdown
Workaround
Turns out gitlab is not able to overwrite the hooks already in place by gitolite (post-receive & update).
We ended up batch updating dozens of already imported repositories like:
$ cd /home/git/repositories
$ find . -type d -iname "hooks" -exec rm {}/post-receive \;
$ find . -type d -iname "hooks" -exec rm {}/update \;
$ find . -type d -iname "hooks" -exec ln -s /home/git/gitlab-shell/hooks/post-receive {}/post-receive \;
$ find . -type d -iname "hooks" -exec ln -s /home/git/gitlab-shell/hooks/update {}/update \;
I guess this might also affect imported repositories with other costumized hooks.