Skip to content
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

Dont count on magic value "master" for the git backend #27497

Open
6543 opened this issue Oct 7, 2023 · 2 comments
Open

Dont count on magic value "master" for the git backend #27497

6543 opened this issue Oct 7, 2023 · 2 comments
Labels
type/refactoring Existing code has been cleaned up. There should be no new functionality.

Comments

@6543
Copy link
Member

6543 commented Oct 7, 2023

There still exist a lot of string values in the codebase of "master"

we at least should use one single const.
but it's better to respect repo specific settings if posible

we should try to determine what the default branch of a repo or at least of the system is

Originally posted by @6543 in #23894 (comment)

@silverwind
Copy link
Member

  1. check per-repo setting
  2. fall back to global default

Indeed we should have no hardcoded master strings in the code anywhere.

@wxiaoguang
Copy link
Contributor

When I did Use "main" as default branch name #19354 , there are only 2 cases left:

  1. The test code
  2. The wiki

Otherwise, I do not see still exist a lot of string values in the codebase of "master"

@6543 6543 added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Oct 7, 2023
wxiaoguang added a commit that referenced this issue Mar 6, 2024
Fix #29000
Fix #28685
Fix #18568

Related: #27497

And by the way fix #24036, add a Cancel button there (one line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

No branches or pull requests

3 participants