aboutsummaryrefslogtreecommitdiff
path: root/cmd/index-pack/algorithm.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-30 15:21:41 +0000
committerGravatar Runxi Yu2026-03-30 15:21:41 +0000
commitaed6b338aedd155d84c3600f8490f77a28681234 (patch)
tree4d7a52e9d10a41cbaa5a3d0dbd64110e09192de4 /cmd/index-pack/algorithm.go
parentobject/store/packed: Rename Base to ThinBase (diff)
signatureNo signature
cmd/index-pack: Remove
Diffstat (limited to 'cmd/index-pack/algorithm.go')
-rw-r--r--cmd/index-pack/algorithm.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/cmd/index-pack/algorithm.go b/cmd/index-pack/algorithm.go
deleted file mode 100644
index fc57991a..00000000
--- a/cmd/index-pack/algorithm.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package main
-
-import (
- "fmt"
-
- objectid "codeberg.org/lindenii/furgit/object/id"
- "codeberg.org/lindenii/furgit/repository"
-)
-
-func resolveAlgorithm(repo *repository.Repository, objectFormat string) (objectid.Algorithm, error) {
- if objectFormat != "" {
- algo, ok := objectid.ParseAlgorithm(objectFormat)
- if !ok {
- return objectid.AlgorithmUnknown, fmt.Errorf("invalid object format %q", objectFormat)
- }
-
- return algo, nil
- }
-
- if repo != nil {
- return repo.Algorithm(), nil
- }
-
- return objectid.AlgorithmSHA1, nil
-}