Allow push-to-create repository functionality to create SHA256 repositories
Currently, pushing to create a project in GitLab fails in Gitaly with the following error:
fatal: the receiving end does not support this repository's hash algorithm
fatal: the remote end hung up unexpectedly
This is because CreateRepository
gets called first to initialize an empty repository, which right now always gets initialized as sha1.
CreateRepository
has a ObjectHash
field that can be set to create a sha256 repo. So we need to modify the caller to call CreateRepository
with the correct ObjectHash
.
I'm unclear what is actually calling CreateRepository
though. Is it workhorse/gitlab-shell or is it rails?
We would need to inspect the pack-protocol data coming from the client to see what object-format=<sha1|sha256>
is, and set the ObjectHash
field properly.
Edited by Christian Couder