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

git_branch_delete_checked_out won't work if there is no master branch #1341

Open
asportnoy opened this issue Nov 3, 2022 · 2 comments
Open

Comments

@asportnoy
Copy link

The code for the git_branch_delete_checked_out rule has the master branch hardcoded as what it should check out. This could be an issue if the repository does not have a master branch. You should dynamically determine the branch that should be used, maybe by using this or just getting a list of branches and choosing the first non-selected branch. master could still be a fallback if the steps fail.

@Rom1deTroyes
Copy link
Contributor

master or main ?
(no troll, just thinking :-)

@asportnoy
Copy link
Author

I don't think there's a one-size-fits-all solution for a hardcoded name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants