Makefile: component-git-update gets default branch
What does this Merge Request do and why?
Prior to this change, a $(shell ...) command was used in the Makefile to find the default branch for a repository. The way it was used was fragile because it was resilient to localization.
When type git remote show
on a Spanish system, you'll get:
Rama HEAD: master
instead of
HEAD branch: master
This change moves the logic to find the default branch to the Ruby script support/component-git-update. Using Ruby makes it easier to parse the output string of the command.
Also instead of git remote show
the command git ls-remote
is used
because it was used under the hood anyway, and it does not suffer from
localization differences.
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 Issue to follow-up. -
Documentation added/updated, if needed. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.