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:
authorSami Hiltunen <shiltunen@gitlab.com>2022-04-07 13:54:25 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2022-04-07 13:54:25 +0300
commit7f7b3c14e36f799090baf48857dcd5ba019bbbc6 (patch)
treede19f25acb666d37b2b22d826d78391c1119fe83 /internal/git
parent23efb30243f15dd8c29e222ba0552a21af9b1cbe (diff)
parentf6d989353d8180abf2559c7212883980f8fad830 (diff)
Merge branch 'smh-delete-object-pool-type' into 'master'
Handle DeleteObjectPool calls in Praefect Closes #3742 and #4078 See merge request gitlab-org/gitaly!4395
Diffstat (limited to 'internal/git')
-rw-r--r--internal/git/housekeeping/object_pool.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/git/housekeeping/object_pool.go b/internal/git/housekeeping/object_pool.go
index f970757de..1e4a935c8 100644
--- a/internal/git/housekeeping/object_pool.go
+++ b/internal/git/housekeeping/object_pool.go
@@ -8,7 +8,8 @@ import (
// railsPoolDirRegexp is used to validate object pool directory structure and name as generated by Rails.
var railsPoolDirRegexp = regexp.MustCompile(`^@pools/([0-9a-f]{2})/([0-9a-f]{2})/([0-9a-f]{64})\.git$`)
-func isRailsPoolPath(relativePath string) bool {
+// IsRailsPoolPath returns whether the relative path indicates this is a pool path generated by Rails.
+func IsRailsPoolPath(relativePath string) bool {
matches := railsPoolDirRegexp.FindStringSubmatch(relativePath)
if matches == nil || !strings.HasPrefix(matches[3], matches[1]+matches[2]) {
return false
@@ -20,5 +21,5 @@ func isRailsPoolPath(relativePath string) bool {
// IsPoolPath returns whether the relative path indicates the repository is an object
// pool.
func IsPoolPath(relativePath string) bool {
- return isRailsPoolPath(relativePath)
+ return IsRailsPoolPath(relativePath)
}