From a041d523de389b65b98a5373a8034041db2a8d83 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 2 Apr 2026 06:23:30 +0000 Subject: *: Remove --- repository/algorithm.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 repository/algorithm.go (limited to 'repository/algorithm.go') diff --git a/repository/algorithm.go b/repository/algorithm.go deleted file mode 100644 index 1098f0b8..00000000 --- a/repository/algorithm.go +++ /dev/null @@ -1,29 +0,0 @@ -package repository - -import ( - "fmt" - - "codeberg.org/lindenii/furgit/config" - objectid "codeberg.org/lindenii/furgit/object/id" -) - -// detectObjectAlgorithm uses a repository's configuration to detect -// the expected Object ID hashing algorithm. -func detectObjectAlgorithm(cfg *config.Config) (objectid.Algorithm, error) { - algoName := cfg.Lookup("extensions", "", "objectformat").Value - if algoName == "" { - algoName = objectid.AlgorithmSHA1.String() - } - - algo, ok := objectid.ParseAlgorithm(algoName) - if !ok { - return objectid.AlgorithmUnknown, fmt.Errorf("repository: unsupported object format %q", algoName) - } - - return algo, nil -} - -// Algorithm returns the repository object ID algorithm. -func (repo *Repository) Algorithm() objectid.Algorithm { - return repo.algo -} -- cgit v1.3.1-10-gc9f91