From 36340918040627d93808c09dea8d9bd7b7457f82 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 24 May 2026 11:07:16 +0000 Subject: object/id: Rename algorithm to object format --- object/id/object_format.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 object/id/object_format.go (limited to 'object/id/object_format.go') diff --git a/object/id/object_format.go b/object/id/object_format.go new file mode 100644 index 00000000..c21e8fa7 --- /dev/null +++ b/object/id/object_format.go @@ -0,0 +1,25 @@ +package id + +// ObjectFormat identifies the Git object format, +// i.e., the hash algorithm used in git object IDs. +type ObjectFormat uint8 + +const ( + // ObjectFormatUnknown identifies an unknown object format. + ObjectFormatUnknown ObjectFormat = iota + + // ObjectFormatSHA1 identifies the SHA-1 object format. + // This is the default for all versions of Git until Git 3.0. + ObjectFormatSHA1 + + // ObjectFormatSHA256 identifies the SHA-256 object format. + // This is the default for Git 3.0 and beyond. + ObjectFormatSHA256 +) + +// SupportedObjectFormats returns all object formats supported by furgit. +// +// Labels: Mut-No. +func SupportedObjectFormats() []ObjectFormat { + return supportedObjectFormats +} -- cgit v1.3.1-10-gc9f91