Extend GitInfo with RepoObjectFormat to store object format
What does this MR do?
Contributes to gitlab#441653 (closed)
Problem
GitLab-Runner initializes an empty repository in the default SHA1 format. An attempt to fetch data from SHA256 repository fails with an error "mismatched algorithms: client sha1; server sha256".
Solution
- Parse GitInfo response to fetch and store
RepoObjectFormat
. - Provide
RepoObjectFormat
value togit init --object-format=
- Update helper image link to include recent GIT version
Reproduction steps
mkdir sha-mismatch
cd sha-mismatch
# by default it uses SHA1
git init
git remote add https://staging.gitlab.com/pks-gitlab/gitaly-sha256
git fetch
> fatal: mismatched algorithms: client sha1; server sha256
Why was this MR needed?
What's the best way to test this MR?
What are the relevant issue numbers?
Edited by Vasilii Iakliushin