Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git/gitpipe/testhelper_test.go')
-rw-r--r--internal/git/gitpipe/testhelper_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/git/gitpipe/testhelper_test.go b/internal/git/gitpipe/testhelper_test.go
index 397c270b3..4bc9f18f7 100644
--- a/internal/git/gitpipe/testhelper_test.go
+++ b/internal/git/gitpipe/testhelper_test.go
@@ -1,11 +1,10 @@
-//go:build !gitaly_test_sha256
-
package gitpipe
import (
"testing"
"gitlab.com/gitlab-org/gitaly/v15/internal/git"
+ "gitlab.com/gitlab-org/gitaly/v15/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper"
)
@@ -51,3 +50,10 @@ func (ch *chanObjectIterator) ObjectID() git.ObjectID {
func (ch *chanObjectIterator) ObjectName() []byte {
return []byte("idontcare")
}
+
+func hashDependentObjectSize(sha1Size, sha256Size int64) int64 {
+ if gittest.ObjectHashIsSHA256() {
+ return sha256Size
+ }
+ return sha1Size
+}