diff options
| author | 2026-06-11 08:16:48 +0000 | |
|---|---|---|
| committer | 2026-06-11 08:16:48 +0000 | |
| commit | 23ccb471fc2f33a1cc1ce7dd3f07c2265fba04bf (patch) | |
| tree | 4867fc69b67c87cb55b0f92b5389b989cbd6fcdc | |
| parent | internal/cache: Fix package name (diff) | |
internal/format/packfile: Fix exhaustiveness in entry_type
| -rw-r--r-- | internal/format/packfile/entry_type.go | 7 |
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. |
