Do foundational work to support gitlab-org/gitlab default branch
Overview
gitlab-com/gl-infra/delivery#1357 (closed) plans to rename gitlab-org/gitlab
default branch from master
to main
, the timeline is still in the works (it might happen during the first quarter of 2021) but when it happens we should be prepared.
Let's use this issue to discuss what needs to be done on this repo before the switch.
Proposal
I'm not certain if this project depends on a hardcoded master
branch for gitlab-org/gitlab
, but if it does we need to change that to:
- Fetch somehow the
gitlab-org/gitlab
default branch - Use that branch instead of a hardcoded
master
string.
From a quick grep search it seems we do reference gitlab-org/gitlab
master
branch in some parts of the codebase.
Expand for details
./Makefile:128: $(Q)git checkout master ${QQ}
./Makefile:239: @echo "Updating gitlab-org/gitlab to current master"
./Makefile:242: $(Q)$(gitlab_git_cmd) checkout master ${QQ}
./Makefile:419: @echo "Updating gitlab-org/gitlab-docs to master"
./Makefile:423: git checkout master ${QQ} &&\
./Makefile:619: @echo "INFO: To install bazel, please consult the docs at https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/kubernetes_agent.md"
./Makefile:932: @echo "ERROR: Bundler is not installed, please ensure you've bootstrapped your machine. See https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/index.md for more details"
./Makefile:946: @echo "ERROR: Bundler is not installed, please ensure you've bootstrapped your machine. See https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/index.md for more details"
./Makefile:964: @echo "ERROR: Golang is not installed, please ensure you've bootstrapped your machine. See https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/index.md for more details"
./Makefile:981: @echo "ERROR: NPM or YARN are not installed, please ensure you've bootstrapped your machine. See https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/index.md for more details"
./support/set-gitlab-upstream:29:echo "Fetching master from ${remote_name}..."
./support/set-gitlab-upstream:32:GIT_CURL_VERBOSE=1 git fetch "${remote_name}" master
./support/set-gitlab-upstream:34:# check if the 'master' branch already exists
./support/set-gitlab-upstream:35:if git show-ref --verify --quiet refs/heads/master; then
./support/set-gitlab-upstream:36: git branch --set-upstream-to="${remote_name}/master" master
./support/set-gitlab-upstream:38: git branch master "${remote_name}/master"
./lib/gdk/dependencies.rb:37: uri = URI("https://gitlab.com/gitlab-org/gitlab/raw/master/#{filename}")
./lib/gdk/dependencies.rb:37: uri = URI("https://gitlab.com/gitlab-org/gitlab/raw/master/#{filename}")
./lib/gdk/config_settings.rb:135: # https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/shell_commands.md#bypass-the-shell-by-splitting-commands-into-separate-tokens
./lib/git/configure.rb:72: # https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/shell_commands.md#bypass-the-shell-by-splitting-commands-into-separate-tokens
./doc/howto/ldap.md:27:given below (see [defaults](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/gitlab.yml.example#L550-769)):
Edited by Ash McKenzie