aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/serv.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-05-07 00:34:16 +0800
committerGitHub <noreply@github.com>2024-05-06 18:34:16 +0200
commit7c613f100e032f821df88a75954fc50b1cf2f926 (patch)
tree18f73e576eb62a593395919b765e7583f1a1ba06 /routers/private/serv.go
parent8e8ca6c6530e49e39f970bdfa84716ffda8973d0 (diff)
downloadgitea-7c613f100e032f821df88a75954fc50b1cf2f926.tar.gz
gitea-7c613f100e032f821df88a75954fc50b1cf2f926.zip
Make sure git version&feature are always prepared (#30877)
Otherwise there would be more similar issues like #29287
Diffstat (limited to 'routers/private/serv.go')
-rw-r--r--routers/private/serv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/serv.go b/routers/private/serv.go
index 85368a0aed..1c309865d7 100644
--- a/routers/private/serv.go
+++ b/routers/private/serv.go
@@ -297,7 +297,7 @@ func ServCommand(ctx *context.PrivateContext) {
}
} else {
// Because of the special ref "refs/for" we will need to delay write permission check
- if git.DefaultFeatures.SupportProcReceive && unitType == unit.TypeCode {
+ if git.DefaultFeatures().SupportProcReceive && unitType == unit.TypeCode {
mode = perm.AccessModeRead
}