Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #30639
Closed (moved) (moved)
Open
Created Apr 07, 2017 by Jody Shumaker@jshumaker

Prune unreferenced Git LFS objects

Description

LFS objects are kept even if all of the the commits that reference them are pruned, due to branch deletion or history re-write.

Proposal

Delete LFS objects which are no longer referenced by any commits in any project.

Currently, LFS objects are deleted based on project reference counts. Project reference counts don't get updated when commits are abandoned. If branches are deleted or history re-written, any commits with LFS pointers that later get pruned won't result in any change to the project's reference count on the objects. Project can end up not referencing the objects in any commits, but still maintaining a hold on it.

Propose using some method of reference counting by commit instead of project, and handling when commits are pruned.

!5901 (merged) addressed deleting these on project deletion, but in many cases you want to keep the project, but abandon a branch or re-write history to fix mistaken addition of bad data, without having to abandon the entire project.

Assignee
Assign to
Time tracking