-
Notifications
You must be signed in to change notification settings - Fork 418
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
Cloning fails for repos using 'main' as the default branch name #286
Comments
This is a reasonable change but could be breaking. If we're going to do this, let's do it in context of a v4 branch. |
I agree that this is a breaking change and a bad one in terms of user impact. So v4 is needed I agree. For context. Git itself (https://lore.kernel.org/git/xmqq4kp8903z.fsf@gitster.c.googlers.com/T/#t) hasn't finished their migration so there is still time until this will be breaking more users in both directions. So far one can set a branch and it works, so users with "main" as default branch already know how to circumvent the breaking. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
It allows checking out repos where the default branch name isn't master kubernetes/git-sync#286
Fixed in v4 branch |
Bug description
When omitting the branch name (
GIT_SYNC_BRANCH
/--branch
), I would assume that the default branch would be synced.The default branch name has been hardcoded as "master", but that's not always the case (junit uses "main", for instance).
MWE
Just cloning a repo and listing its content.
Proposed solution
nil
.git
's-b
flag when the previous variable is empty/nil
.The text was updated successfully, but these errors were encountered: