Push HEAD instead of master when initialising repositories#13719
Merged
techknowlogick merged 3 commits intoNov 28, 2020
Conversation
It is possible on modern gits to change the initial branch to something other than master. This breaks initialising repositories because we assume that the initial branch is going to be master unless specifically changed. This PR simply bypasses this issue by pushing the HEAD rather than the master branch. Signed-off-by: Andrew Thornton <art27@cantab.net>
mrsdizzie
reviewed
Nov 27, 2020
mrsdizzie
approved these changes
Nov 27, 2020
Codecov Report
@@ Coverage Diff @@
## master #13719 +/- ##
=======================================
Coverage 42.25% 42.25%
=======================================
Files 697 697
Lines 76630 76630
=======================================
Hits 32380 32380
- Misses 38925 38930 +5
+ Partials 5325 5320 -5
Continue to review full report at Codecov.
|
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
lafriks
approved these changes
Nov 27, 2020
silverwind
approved these changes
Nov 28, 2020
Member
|
🚀 |
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Nov 28, 2020
…13719) * Push HEAD instead of master when initialising repositories It is possible on modern gits to change the initial branch to something other than master. This breaks initialising repositories because we assume that the initial branch is going to be master unless specifically changed. This PR simply bypasses this issue by pushing the HEAD rather than the master branch. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/repository/init.go Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
techknowlogick
added a commit
that referenced
this pull request
Nov 28, 2020
…13740) * Push HEAD instead of master when initialising repositories It is possible on modern gits to change the initial branch to something other than master. This breaks initialising repositories because we assume that the initial branch is going to be master unless specifically changed. This PR simply bypasses this issue by pushing the HEAD rather than the master branch. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/repository/init.go Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is possible on modern gits to change the initial branch to something other than
master. This breaks initialising repositories because we assume that the initial
branch is going to be master unless specifically changed.
This PR simply bypasses this issue by pushing the HEAD rather than the master branch.
Signed-off-by: Andrew Thornton art27@cantab.net