plumbing: add IsDelta method to ObjectType

ObjectType.IsDelta is a convenience function to match both
offset and reference delta types.
diff --git a/plumbing/format/packfile/delta_selector.go b/plumbing/format/packfile/delta_selector.go
index 4bee6d3..efcbd53 100644
--- a/plumbing/format/packfile/delta_selector.go
+++ b/plumbing/format/packfile/delta_selector.go
@@ -96,9 +96,7 @@
 }
 
 func (dw *deltaSelector) fixAndBreakChainsOne(objectsToPack map[plumbing.Hash]*ObjectToPack, otp *ObjectToPack) error {
-	isDelta := otp.Object.Type() == plumbing.OFSDeltaObject ||
-		otp.Object.Type() == plumbing.REFDeltaObject
-	if !isDelta {
+	if !otp.Object.Type().IsDelta() {
 		return nil
 	}
 
@@ -141,9 +139,7 @@
 		return nil
 	}
 
-	isDelta := otp.Object.Type() == plumbing.OFSDeltaObject ||
-		otp.Object.Type() == plumbing.REFDeltaObject
-	if !isDelta {
+	if !otp.Object.Type().IsDelta() {
 		return nil
 	}
 
diff --git a/plumbing/object.go b/plumbing/object.go
index 63396f0..2655dee 100644
--- a/plumbing/object.go
+++ b/plumbing/object.go
@@ -82,6 +82,12 @@
 	return t >= CommitObject && t <= REFDeltaObject
 }
 
+// IsDelta returns true for any ObjectTyoe that represents a delta (i.e.
+// REFDeltaObject or OFSDeltaObject).
+func (t ObjectType) IsDelta() bool {
+	return t == REFDeltaObject || t == OFSDeltaObject
+}
+
 // ParseObjectType parses a string representation of ObjectType. It returns an
 // error on parse failure.
 func ParseObjectType(value string) (typ ObjectType, err error) {