Aborted client-side git push
can cause server post-commit hooks to be aborted or skipped
#10276
Closed
2 of 8 tasks
Labels
[x]
):gitea.pushfail.log
Description
I created a new repository in the UI then from a remote client added the origin to an existing repository (
git add remote origin ...
) and pushed the local commit history (git push -u origin master
).The push was taking awhile so I wanted to rerun it with
--verbose
to see if I can catch the reason for the delay, so I aborted the push with ^C and pushed again with--verbose
but it was too late, there were no changes to be pushed.However, when navigating to the repository in the UI, the repository still appears "new", the commits are not reflected (just like in #3795). I've attached the log, but it looks like aborting the push either aborted the git post-commit hooks or else prevented them from being run.
I know this isn't the case with GitHub (I've aborted pushes at just about every stage of the process without any out-of-sync issues there); does gitea perform the database updates while the client is connected (i.e. synchronously)? There's still no way to trigger a reindex, so I'm not sure how to get the commits to show without adding and pushing a spurious commit just to get it to reindex (but this is minor).
Screenshots
The UI after the failed push:
and yet, as viewed from the bare git storage directory used by gitea on the server itself:
The text was updated successfully, but these errors were encountered: