Can't create files using the web editor

On current master (03738bdd), I can't create a file using the web editor. It leads to No implicit conversion of Gitlab::Git::Commit into String in lib/gitlab/git/hook.rb.

create-file

The first commit having the bug is https://gitlab.com/gitlab-org/gitlab-ce/commit/065a65adfe3508581664358779821b802476ee0d, so I think that this is caused by gitlab_git@396cba39.

cc @eReGeBe