-
Notifications
You must be signed in to change notification settings - Fork 10.5k
update_checkout (tests): Use 'main' for test branch #40129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good, but please do check with @shahmishal that this shouldn't cause any unintentional issues.
@swift-ci Please smoke test |
As far as I can tell, it looks like the I've updated this to use @swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change main to master
In addition to following current best practices for inclusive terms, this also fixes an issue that occurs if a user has customized their local git config to use an alternate default branch name (using 'init.defaultBranch'). If a user has set 'init.defaultBranch' in their git config to anything other than master, the update_checkout tests fail. By setting the sybolic-ref for HEAD after initializing the bare repo, the user's setting will not affect the test.
If 'call_quietly' fails, there is no indication as to what the failure was, except for the exit/status code from the subprocess. This adds a new exception type that will print out stdout/stderr from the subprocess
OK, one more try here. It still doesn't seem to be respecting the @swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
@shahmishal any opposition to merging this? |
LGTM, merged |
This updates the tests for
utils/update_checkout
to usemain
for the test branch names in git (as opposed tomaster
). In addition to following current best practices for inclusive terms, this also fixes an issue that occurs if a user has customized their local git config to use an alternate default branch name (usinginit.defaultBranch
).If a user has set
init.defaultBranch
in their git config to anything other thanmaster
, the tests fail. By updating thegit init
call to use--initial-branch=main
, the user's setting will not affect the test.