mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-11 20:49:15 +00:00
committed by
Lunny Xiao
parent
b209531959
commit
33ad554800
6
vendor/gopkg.in/src-d/go-git.v4/config/refspec.go
generated
vendored
6
vendor/gopkg.in/src-d/go-git.v4/config/refspec.go
generated
vendored
@@ -99,11 +99,11 @@ func (s RefSpec) matchGlob(n plumbing.ReferenceName) bool {
|
||||
|
||||
var prefix, suffix string
|
||||
prefix = src[0:wildcard]
|
||||
if len(src) < wildcard {
|
||||
suffix = src[wildcard+1 : len(suffix)]
|
||||
if len(src) > wildcard+1 {
|
||||
suffix = src[wildcard+1:]
|
||||
}
|
||||
|
||||
return len(name) > len(prefix)+len(suffix) &&
|
||||
return len(name) >= len(prefix)+len(suffix) &&
|
||||
strings.HasPrefix(name, prefix) &&
|
||||
strings.HasSuffix(name, suffix)
|
||||
}
|
||||
|
Reference in New Issue
Block a user