Skip to content

Clean up orphaned LFS file references during GC

Nick Thomas requested to merge 223621-prune-lfs-objects-during-git-gc into master

What does this MR do?

There's no automatic removal of LFS objects from GitLab projects at the moment, if they become orphaned.

#215098 (closed) will introduce a way to do this fully automatically, but in the meantime, we have a pressing need for people to be able to remove (often very large) LFS objects from their projects once they're no longer referenced by the repository.

GitGarbageCollectWorker is an obvious place to put this, and will result in LFS cleanup happening at the same time as main repository cleanup - including when we run the "project cleanup" steps documented here: https://docs.gitlab.com/ee/user/project/repository/reducing_the_repo_size_using_git.html

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Implements #223621 (closed)

Edited by Nick Thomas

Merge request reports

Loading