DeleteObject deletes an object from a repository. The type conveniently matches PruneHandler.
(hash plumbing.Hash)
| 22 | // DeleteObject deletes an object from a repository. |
| 23 | // The type conveniently matches PruneHandler. |
| 24 | func (r *Repository) DeleteObject(hash plumbing.Hash) error { |
| 25 | los, ok := r.Storer.(storer.LooseObjectStorer) |
| 26 | if !ok { |
| 27 | return ErrLooseObjectsNotSupported |
| 28 | } |
| 29 | |
| 30 | return los.DeleteLooseObject(hash) |
| 31 | } |
| 32 | |
| 33 | func (r *Repository) Prune(opt PruneOptions) error { |
| 34 | los, ok := r.Storer.(storer.LooseObjectStorer) |
nothing calls this directly
no test coverage detected