aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/storer/object.go5
-rw-r--r--plumbing/storer/object_test.go4
2 files changed, 9 insertions, 0 deletions
diff --git a/plumbing/storer/object.go b/plumbing/storer/object.go
index bd34be8..29e0090 100644
--- a/plumbing/storer/object.go
+++ b/plumbing/storer/object.go
@@ -52,6 +52,11 @@ type EncodedObjectStorer interface {
LooseObjectTime(plumbing.Hash) (time.Time, error)
// DeleteLooseObject deletes a loose object if it exists.
DeleteLooseObject(plumbing.Hash) error
+ // ObjectPacks returns hashes of object packs if the underlying
+ // implementation has pack files.
+ ObjectPacks() ([]plumbing.Hash, error)
+ // DeleteObjectPackAndIndex deletes an object pack and the corresponding index file if they exist.
+ DeleteObjectPackAndIndex(plumbing.Hash) error
}
// DeltaObjectStorer is an EncodedObjectStorer that can return delta
diff --git a/plumbing/storer/object_test.go b/plumbing/storer/object_test.go
index f8b1f73..68e8e10 100644
--- a/plumbing/storer/object_test.go
+++ b/plumbing/storer/object_test.go
@@ -161,3 +161,7 @@ func (o *MockObjectStorage) LooseObjectTime(plumbing.Hash) (time.Time, error) {
func (o *MockObjectStorage) DeleteLooseObject(plumbing.Hash) error {
return plumbing.ErrObjectNotFound
}
+
+func (o *MockObjectStorage) ObjectPacks() ([]plumbing.Hash, error) {
+ return nil, nil
+}