Skip to content

Speed up git fetch of gitlab-org/gitlab during gdk update

What does this merge request do and why?

This MR speeds up running git fetch in gitlab-org/gitlab during gdk update by about 27 seconds. This is done by using git fetch origin master in gdk update instead of git fetch --tags --all --prune because the latter takes 30+ seconds to run.

This should not cause problems because we don’t use tags for development in gitlab-org/gitlab and the subsequent git pull also fetches branch updates.

Try it yourself, in the gitlab repo: time git fetch versus time git fetch origin master

How to set up and validate locally

  1. Run GDK_SELF_UPDATE=0 gdk update
  2. Note the duration of gitlab-git-pull
  3. GDK_SELF_UPDATE=0 gdk update
  4. See that gitlab-git-pull is about 27 seconds faster.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.

Merge request reports