Skip to content

Commit 34cb29d

Browse files
committed
disable RepoRef
1 parent 2c754e6 commit 34cb29d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

services/context/repo.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,9 @@ func RepoAssignment(ctx *Context) {
680680
const headRefName = "HEAD"
681681

682682
func RepoRef() func(*Context) {
683-
if !setting.IsProd || setting.IsInTesting {
684-
// RepoRef should not be used, the handler should explicit use the ref it needs
685-
return nil
686-
}
687-
return RepoRefByType(git.RefTypeBranch)
683+
// old code does: return RepoRefByType(git.RefTypeBranch)
684+
// in most cases, it is an abuse, so we just disable it completely and fix the abuses one by one (if there is anything wrong)
685+
return nil
688686
}
689687

690688
func getRefNameFromPath(repo *Repository, path string, isExist func(string) bool) string {

0 commit comments

Comments
 (0)