Follow-up of #414 and an ongoing discussion on how to keep Codeberg clean and repo sizes low. We considered using git hooks to check for users (accidently) uploading large files in their commits that is not intended for the public. Removing this from the repo keeps it in the git history and thus it counts to the repo size (on Codeberg and on every contributors machine).
We would need a way to filter out
- accidental commits of large binary files, especially compiled software
- inclusion of build artefacts and caching (which is much harder to spot since this are small files, maybe some filtering for the names?)
There was a consideration to use git hooks for this job to check content while a user is pushing stuff to the repo. It's possible to echo messages back. Still, there must be a way to tell the server that uploading this stuff is indeed intended.
We are looking for help for the technical implementations to check the commits on receive, echo an informing message to the user and have a way to override the blocking in case the upload is intended. Any volunteers?