-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Push update failed when git tag reference to a blob #23213
Labels
Comments
adlternative
added a commit
to adlternative/gitea
that referenced
this issue
Mar 2, 2023
Because git ref may reference to blob/tree, but push update logic will treate the object as a commit. Therefore, an error occurred when parsing the commit object, resulting in the loss of the webhook notification of this ref and other refs. So we ignore the wrong type error here to let other common refs can do webhook normally. Hope to fix go-gitea#23213. Signed-off-by: ZheNing Hu <adlternative@gmail.com>
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Mar 14, 2025
wxiaoguang
added a commit
that referenced
this issue
Mar 14, 2025
project-mirrors-bot-tu bot
pushed a commit
to project-mirrors/forgejo-as-gitea-fork
that referenced
this issue
Mar 17, 2025
Fix go-gitea#23213 (cherry picked from commit cb6b33c)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When I push git source code repository to gitea, I found gitea server log turn out error:
So I check and find out that this object is a special tag which reference to a blob:
This made me realize that gitea may not consider the ref references to other blobs/trees at all. Since the error occurs in the post-receive-hook, this error may cause some notifications to be lost.
A simple workaround might be to skip this specially referenced webhook, this at least won't let us lose the webhook for common references.
But a more complete approach may be to modify the content of the notification, make it compatible with this special reference.
Gitea Version
3e426bb
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
2.34.1
Operating System
archlinux
How are you running Gitea?
command-line
Database
MySQL
The text was updated successfully, but these errors were encountered: