gitlab: use --refetch in check-patch/check-dco jobs
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 25 Feb 2025 11:05:25 +0000 (11:05 +0000)
committerThomas Huth <thuth@redhat.com>
Wed, 26 Feb 2025 06:45:57 +0000 (07:45 +0100)
commitd5d028eee38d4107821c0d2cfdb0dd04b9ba5ca3
tree591e2ccdf812e4ce0eda152969dbdcc177c37712
parentfe95724da2180681b7d78e9c2b9fd8438023f9ce
gitlab: use --refetch in check-patch/check-dco jobs

When gitlab initializes the repo checkout for a CI job, it will have
done a shallow clone with only partial history. Periodically the objects
that are omitted cause trouble with the check-patch/check-dco jobs. This
is exhibited as reporting strange errors being unable to fetch certain
objects that are known to exist.

Passing the --refetch flag to 'git fetch' causes it to not assume the
local checkout has all common objects and thus re-fetch everything that
is needed. This appears to solve the check-patch/check-dco job failures.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20250225110525.2209854-1-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
.gitlab-ci.d/check-dco.py
.gitlab-ci.d/check-patch.py