gitea
gitea copied to clipboard
Reject push if refs contains LFS object unknown to server
Feature Description
We had an issue where a client hooks manager made the lfs pre-push
not work correctly, thus resulting in commits being push without their LFS objects.
While reproducing and testing things around, I encountered the following fail on a push to a Github repository:
remote: error: GH008: Your push referenced at least 1 unknown Git LFS object:
remote: cd0e6edf7a48b6b12ca737319acdc0ec1e4ff8918a264499d7e60bfc558c4341
remote: Try to push them with 'git lfs push --all'.
To https://github.com/tdesveaux/test_private.git
! [remote rejected] HEAD -> test_lfs (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/tdesveaux/test_private.git'
It would be great if Gitea did the same sanity check preventing users from pushing commits without their LFS objects.
Screenshots
No response