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/packfile/index.go')
-rw-r--r--internal/git/packfile/index.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/git/packfile/index.go b/internal/git/packfile/index.go
index 6597c8949..8f61544c3 100644
--- a/internal/git/packfile/index.go
+++ b/internal/git/packfile/index.go
@@ -21,8 +21,11 @@ import (
const sumSize = sha1.Size
+const regexCore = `(.*/pack-)([0-9a-f]{40})`
+
var (
- idxFileRegex = regexp.MustCompile(`\A(.*/pack-)([0-9a-f]{40})\.idx\z`)
+ idxFileRegex = regexp.MustCompile(`\A` + regexCore + `\.idx\z`)
+ packFileRegex = regexp.MustCompile(`\A` + regexCore + `\.pack\z`)
)
// Index is an in-memory representation of a packfile .idx file.