#418 Git hooks for large commits

Open
opened 4 weeks ago by fnetX · 3 comments
fnetX commented 4 weeks ago
Collaborator

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?

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?
fnetX added the
contribution welcome
label 4 weeks ago
fnetX added the
infrastructure
label 4 weeks ago
hw commented 4 weeks ago
Owner

There was a consideration to use git hooks ...

another option maybe cron jobs filing tickets via API into the project's issue tracker?

> There was a consideration to use git hooks ... another option maybe cron jobs filing tickets via API into the project's issue tracker?
fnetX commented 4 weeks ago
Poster
Collaborator

Well, that is what we discussed in #414 ... but it won't prevent people from accidental uploads. Once it's in the git history, it cannot be removed without annoying everyone else.

Well, that is what we discussed in #414 ... but it won't **prevent** people from accidental uploads. Once it's in the git history, it cannot be removed without annoying everyone else.
hw commented 3 weeks ago
Owner

Good point

Good point
Sign in to join this conversation.
Loading…
There is no content yet.