-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add support for sha256 repositories #23894
Conversation
As additional comments for this PR,
Comments are welcome. I do not expect this to land soon and I expect some changes. |
Whoa! This is a huge accomplishment! Thank you <3 |
There is a funny issue I've reported upstream (git) now. And it's funny by semi-blocking here. If you do,
You will see respective results, 00cb0000000000000000000000000000000000000000000000000000000000000000 00b10000000000000000000000000000000000000000 Basically, the git-clone uses Gitea uses TL;DR: This means that if you create a SHA256 repository with nothing in it and clone it, you will get a SHA1 repository. This then will fail to push. |
Looks like we have a preliminary patch for this issue upstream now git/git@8b214c2 |
19c5107
to
05d320a
Compare
Looks like go-git/go-git#707 is starting point for SHA256 go-git implementation. I'll refactor my patches to align more with those changes. |
dbaf01f
to
93219a8
Compare
8f5987a
to
9fd63ce
Compare
The patch is now rebased on top of latest |
is this you @AdamMajer -> https://sha2git.com ?!? |
No, I'm not related to this. Aside, now I have a little more time to work on this so hopefully we can have this merged soon ™️ 🤞 |
well the insert yes ... did add a count check as for the other one ... see #23894 (comment) we either have to update it first or we dont |
ok I'll put my hands away again ;)
|
Well avter a 360° commit session we are back ... to start diff 😆 could you add at least a codecomment that the update statement only exist to catch strange edgecases if they exist ... ? |
Thanks for all the work in helping this patch to finally land. Extra credits go to @lunny for all the help! |
wow thanks for the hard work to all - we have initiall support ... now we can build ontop that e.g. for go-git ... |
Great that this finally landed! Did you by any chance check the label in repo heeder on mobile? It could be broken as we display icons instead of labels there. If not, I'll check later... |
no i did not checked the mobile ui 😅 - that's then for a followup if it's broken :) |
GoGit needs to implement new API for ability to support different hashes. Currently they only support Any issues here with this patch, please open a new issue. |
Fix go-gitea/gitea#23894 (comment) (cherry picked from commit 2ad9ef4984f0b68ef38241fd6b557d8427d851d8) Conflicts: models/migrations/v1_16/v210.go models/migrations/v1_22/v286.go trivial conflicts because MSSQL is no longer supported
Currently only SHA1 repositories are supported by Gitea. This adds support for alternate SHA256 with the additional aim of easier support for additional hash types in the future.
Fixes: #13794
Limited by: go-git/go-git#899
Depend on: #28138