aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/storer/object.go
diff options
context:
space:
mode:
authorJeremy Stribling <strib@alum.mit.edu>2018-10-11 16:24:25 -0700
committerJeremy Stribling <strib@alum.mit.edu>2018-10-11 17:12:21 -0700
commit1e1315d5e587d481e73e295dd18e50026af48c79 (patch)
tree5819d378bc667a0f39d51abc230fc678828d5234 /plumbing/storer/object.go
parent0bfe038a16551ede1d22bfb54f52c31b646a9e1a (diff)
downloadgo-git-1e1315d5e587d481e73e295dd18e50026af48c79.tar.gz
object: get object size without reading whole object
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
Diffstat (limited to 'plumbing/storer/object.go')
-rw-r--r--plumbing/storer/object.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/plumbing/storer/object.go b/plumbing/storer/object.go
index 92aa629..2ac9b09 100644
--- a/plumbing/storer/object.go
+++ b/plumbing/storer/object.go
@@ -40,6 +40,8 @@ type EncodedObjectStorer interface {
// HasEncodedObject returns ErrObjNotFound if the object doesn't
// exist. If the object does exist, it returns nil.
HasEncodedObject(plumbing.Hash) error
+ // EncodedObjectSize returns the plaintext size of the encoded object.
+ EncodedObjectSize(plumbing.Hash) (int64, error)
}
// DeltaObjectStorer is an EncodedObjectStorer that can return delta