|
|
@ -218,9 +218,9 @@ Gitea or set your environment appropriately.`, "")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
supportProcRecive := false
|
|
|
|
supportProcReceive := false
|
|
|
|
if git.CheckGitVersionAtLeast("2.29") == nil {
|
|
|
|
if git.CheckGitVersionAtLeast("2.29") == nil {
|
|
|
|
supportProcRecive = true
|
|
|
|
supportProcReceive = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for scanner.Scan() {
|
|
|
|
for scanner.Scan() {
|
|
|
@ -241,9 +241,9 @@ Gitea or set your environment appropriately.`, "")
|
|
|
|
lastline++
|
|
|
|
lastline++
|
|
|
|
|
|
|
|
|
|
|
|
// If the ref is a branch or tag, check if it's protected
|
|
|
|
// If the ref is a branch or tag, check if it's protected
|
|
|
|
// if supportProcRecive all ref should be checked because
|
|
|
|
// if supportProcReceive all ref should be checked because
|
|
|
|
// permission check was delayed
|
|
|
|
// permission check was delayed
|
|
|
|
if supportProcRecive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) {
|
|
|
|
if supportProcReceive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) {
|
|
|
|
oldCommitIDs[count] = oldCommitID
|
|
|
|
oldCommitIDs[count] = oldCommitID
|
|
|
|
newCommitIDs[count] = newCommitID
|
|
|
|
newCommitIDs[count] = newCommitID
|
|
|
|
refFullNames[count] = refFullName
|
|
|
|
refFullNames[count] = refFullName
|
|
|
|