From 1504b30e1befd60c87984393d6638667f1881cac Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 23 Nov 2020 17:51:58 +0100 Subject: Use more radix path scheme for key --- internal/gitaly/service/hook/pack_objects.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/gitaly/service/hook/pack_objects.go b/internal/gitaly/service/hook/pack_objects.go index 1dff03431..5387f73d0 100644 --- a/internal/gitaly/service/hook/pack_objects.go +++ b/internal/gitaly/service/hook/pack_objects.go @@ -258,7 +258,7 @@ func (e *entry) isStale() bool { return time.Since(e.created) > e.c.maxAge } func (e *entry) chunkKey(i int) string { chunk := fmt.Sprintf("%02x", i) - return fmt.Sprintf("%s/%s/%s/%d", e.key, chunk[len(chunk)-2:], chunk, e.id) + return fmt.Sprintf("%s/%s/%s/%s/%s/%d", e.key[:2], e.key[2:4], e.key[4:], chunk[len(chunk)-2:], chunk, e.id) } func (e *entry) delete() { -- cgit v1.2.3