-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
Description
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
Some commands still use a master branch while some use main
refresh-repository.php has master hardcoded though:
wp-cli-dev/.maintenance/refresh-repository.php
Lines 12 to 13 in c040d8e
| printf( "Switching to latest \033[33mmaster\033[0m branch...\n" ); | |
| system( "git --git-dir={$path}/.git --work-tree={$path} checkout master" ); |
Describe the solution you'd like
Detect which branch is the default and use that instead of hardcoded master.
Locally I use a command like git checkout $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') to achieve this.
Reactions are currently unavailable