aboutsummaryrefslogtreecommitdiff
path: root/internal/format
diff options
context:
space:
mode:
Diffstat (limited to 'internal/format')
-rw-r--r--internal/format/packfile/entry_type.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/format/packfile/entry_type.go b/internal/format/packfile/entry_type.go
index 1dbf0ba9..b4baceb4 100644
--- a/internal/format/packfile/entry_type.go
+++ b/internal/format/packfile/entry_type.go
@@ -45,6 +45,7 @@ func EntryTypeFromObjectType(ty typ.Type) (EntryType, error) {
return EntryTypeBlob, nil
case typ.Tag:
return EntryTypeTag, nil
+ case typ.Unknown:
}
return EntryTypeInvalid, ErrUnrepresentableObjectType
@@ -61,6 +62,7 @@ func (entryType EntryType) ObjectType() (typ.Type, error) {
return typ.Blob, nil
case EntryTypeTag:
return typ.Tag, nil
+ case EntryTypeInvalid, EntryTypeFuture, EntryTypeOfsDelta, EntryTypeRefDelta:
}
return typ.Unknown, ErrInternalEntryType
@@ -73,10 +75,9 @@ func (entryType EntryType) IsBase() bool {
case EntryTypeCommit, EntryTypeTree, EntryTypeBlob, EntryTypeTag:
return true
case EntryTypeInvalid, EntryTypeFuture, EntryTypeOfsDelta, EntryTypeRefDelta:
- return false
- default:
- return false
}
+
+ return false
}
// IsDelta reports whether the entry type is a delta type.