-
-
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
Simplify IsVendor
#19626
Simplify IsVendor
#19626
Conversation
- Use the provided function by go-enry. This file was actually more or less duplicated code from go-enry: https://github.com/go-enry/go-enry/blob/ed2adad15906ed7f262e64b502eb91de08176314/utils.go#L139-L246
Oh Yes! Upstream has the optimization. |
IIRC, this optimization was upstreamed into enry, so it might indeed be possible to remove it here. cc @zeripath. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream has the optimization already. LGTM
https://github.com/go-enry/go-enry/releases/tag/v2.7.0
Gitea uses: github.com/go-enry/go-enry/v2 v2.7.1
Yes @zeripath did submit this optimization upstream and it was already merged |
No... the go-enry code duplicates this code.
yup: go-enry/go-enry#44 |
* giteaofficial/main: Simplify `IsVendor` (go-gitea#19626) Prevent NPE when checking repo units if the user is nil (go-gitea#19625) Skip duplicated layers. (go-gitea#19624) Add "Reference" section to Issue view sidebar (go-gitea#19609) GetFeeds must always discard actions with dangling repo_id (go-gitea#19598)
The changes in this file were upstreamed directly into go-enry as go-enry/go-enry#44 and therefore they are no longer needed.
The changes in this file were upstreamed directly into go-enry as go-enry/go-enry#44
and therefore they are no longer needed.