Fixes a NoMethodError in the pre-receive hook: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/206