From 189aa75333453434fc4b2f1f71dcce89cfba1fcb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 15 May 2026 17:51:47 +0000 Subject: obejct/id: Remove pack/signature/etc-specific object ID properties These properties should belong to their relevant package rather than getting stuffed into object/id. --- object/id/algorithm_ops.go | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'object/id/algorithm_ops.go') diff --git a/object/id/algorithm_ops.go b/object/id/algorithm_ops.go index 01d26c08..80f1f9cd 100644 --- a/object/id/algorithm_ops.go +++ b/object/id/algorithm_ops.go @@ -2,13 +2,6 @@ package id import "hash" -// EmptyTree returns the object ID of -// an empty tree ("tree 0\x00") -// for this algorithm. -func (algo Algorithm) EmptyTree() ObjectID { - return algo.details().emptyTree -} - // HexLen returns the encoded hexadecimal length. func (algo Algorithm) HexLen() int { return algo.Size() * 2 @@ -29,18 +22,6 @@ func (algo Algorithm) New() (hash.Hash, error) { return newFn(), nil } -// PackHashID returns the Git pack/rev hash-id encoding for this algorithm. -// -// Unknown algorithms return 0. -func (algo Algorithm) PackHashID() uint32 { - return algo.details().packHashID -} - -// SignatureHeaderName returns the signature header name for this algorithm. -func (algo Algorithm) SignatureHeaderName() string { - return algo.details().signatureHeaderName -} - // String returns the canonical algorithm name. func (algo Algorithm) String() string { return algo.details().name -- cgit v1.3.1-10-gc9f91