-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
default branch is random after git push --mirror #3913
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
Comments
Any plans to fix it before 1.5.0 hits? |
@davidlt This is unlikely be be released in 1.5.0, but perhaps 1.5.1. The way we could fix this is keep existing logic, but perhaps if we see a "master" branch is there then we assume it is default. That way edge case that was resolved with the linked PR could still be covered, but for everyone else this stays the same. |
Maybe this should be moved to 1.5.1 milestone? |
Basically the problem's origin is here Line 185 in 05dcfcf
The first reference with at least one commit will become the default branch, because it is only set for a "bare" repository. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
I saw this issue while migrating data from another git server using I tried pushing the default branch first and then using It would be very helpful to be able to update the default branch via the API. I ended up doing it manually, which took a while. |
I believe this is fixed now. Please reopen if this is still a problem. |
Official 1.4.1 from github
git version 2.17.0
Fedora 27 (server) / Fedora 28 (client)
[x]
):Description
[..]
To https://try.gitea.io/blah/restic.git
[..]
Default branch: refs/changes/60/231960/1 (which is not even the first pushed?)
[..]
[..]
So now for each "forked" repo you need to change settings to set default branch to master or whatever else.
This change happened with 1.4.1 (most likely due to #3715 ).
The text was updated successfully, but these errors were encountered: