-
Notifications
You must be signed in to change notification settings - Fork 388
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
Clean up/refactor git configuration #7538
base: master
Are you sure you want to change the base?
Conversation
system 'git init' | ||
system 'git config advice.detachedHead false' | ||
system 'git config init.defaultBranch master' | ||
system 'git init --quiet', exception: true # use --quiet to suppress default branch name warning |
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.
I'm not a fan of quiet. Hiding stuff is not what I prefer.
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.
There is no other way to hide this:
Performing pre-flight checks...
No precompiled binary available for your platform, downloading source...
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
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.
Have you tried git config --global init.defaultBranch master
? That should make the message go away.
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.
We should probably start setting git config --global init.defaultBranch main
since that's becoming the new norm...
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.
Can we get rid of line 775 and merge this?
The git config line in line 776 should in theory make this message go away, no?
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.
If you push up another commit on this PR branch, it should fire another workflow run; hopefully without errors.
Description
This is a small little refactor for our git clone code.
Changes:
--quiet
togit init
to suppress the new warning about branch namesAdditional information
Works properly:
x86_64
i686
armv7l
Run the following to get this pull request's changes locally for testing.