From 784e87df94edc155aca94f1cd4a381d7650982b6 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 16 May 2026 08:12:35 +0000 Subject: object/id: Remove more stuff that should belong in other subsystems --- object/id/algorithm_details.go | 2 -- object/id/algorithm_parse.go | 10 +--------- object/id/doc.go | 9 ++++++++- 3 files changed, 9 insertions(+), 12 deletions(-) (limited to 'object/id') diff --git a/object/id/algorithm_details.go b/object/id/algorithm_details.go index 883853c7..72e953a1 100644 --- a/object/id/algorithm_details.go +++ b/object/id/algorithm_details.go @@ -57,8 +57,6 @@ var ( //nolint:gochecknoglobals algorithmByName = map[string]Algorithm{} //nolint:gochecknoglobals - algorithmBySignatureHeaderName = map[string]Algorithm{} - //nolint:gochecknoglobals supportedAlgorithms []Algorithm ) diff --git a/object/id/algorithm_parse.go b/object/id/algorithm_parse.go index 63db32dc..271c3e60 100644 --- a/object/id/algorithm_parse.go +++ b/object/id/algorithm_parse.go @@ -5,12 +5,4 @@ func ParseAlgorithm(s string) (Algorithm, bool) { algo, ok := algorithmByName[s] return algo, ok -} - -// ParseSignatureHeaderName parses one canonical signature header name -// such as "gpgsig" or "gpgsig-sha256" to its respective algorithm. -func ParseSignatureHeaderName(s string) (Algorithm, bool) { - algo, ok := algorithmBySignatureHeaderName[s] - - return algo, ok -} +} \ No newline at end of file diff --git a/object/id/doc.go b/object/id/doc.go index 06af78b6..4feebe87 100644 --- a/object/id/doc.go +++ b/object/id/doc.go @@ -1,2 +1,9 @@ // Package id provides Git object IDs and hash algorithms. -package id +// +// Not all properties about +// each object ID hash algorithm +// are listed here. +// In particular, +// properties that only make sense for particular subsystems +// should be defined in that subsystem. +package id \ No newline at end of file -- cgit v1.3.1-10-gc9f91