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

Do true default remote branch detection #307

Open
alerque opened this issue Jun 23, 2021 · 1 comment
Open

Do true default remote branch detection #307

alerque opened this issue Jun 23, 2021 · 1 comment

Comments

@alerque
Copy link
Collaborator

alerque commented Jun 23, 2021

We took one pass at this issue in #294, closed by PR #295, but the solution was to just iteratively check a few possibilities. This is more robust and definitely deserved to be included in the code sooner than later, but I can't help but feeling it's not the best permanent solution.

I'm opening this to track an ultimate solution. As I commented here one potential solution might be to clone first and ask questions later: specifically doing a bare clone and just letting Git find the default branch itself, then inspecting what it came up with and using that info to do a checkout.

@RichiH
Copy link
Owner

RichiH commented Jun 23, 2021

Agreed, doing it fully dynamically would be best. As 80/20 implementation it should get us rather far as master and main most likely comprise near-100% of use cases (unless someone has floating branches rebasing on others for local config or so. But that would most likely mean clean/smudge filters or special server-side code and thus be unlikely)

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