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
Relates to: #1780 (closed)
How to set up and validate locally
- Run
GDK_SELF_UPDATE=0 gdk update
- Note the duration of
gitlab-git-pull
GDK_SELF_UPDATE=0 gdk update
- See that
gitlab-git-pull
is about 27 seconds faster.
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
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 theCHANGELOG.md
.
Edited by Kev Kloss