Hook 'update' triggered when accepting MR
After deploying a custom hook on server side, which is the update one to be exact, into the folder custom_hooks as documented, I noticed that the hook is executed when accepting a merge request; basically when I click on the "Merge" button of a merge request, I can see the update hook being triggered.
Git documentation states
This hook is invoked by git-receive-pack on the remote repository, which happens when a git push is done on a local repository.
Which would mean that accepting a merge request is done through a push on a local repository on the remote from the remote, which is weird by nature.
So I am wondering if that was by design or mistake ? In my opinion this is very counter intuitive because if the remote is capable of merging 2 branches that means that the objects have already been pushed on the remote, in which case the update hook should not be triggered on MR acceptance since it should be triggered only when receiving objects.