aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-10-12 13:42:10 +0800
committerGitHub <noreply@github.com>2024-10-12 05:42:10 +0000
commitafa8dd45af29f529f3695b4d2bab7ed98ac830db (patch)
tree88773f35c396edf78ad8910fd9e068ca5f2eadcc /routers
parent900ac622514081b90e08135cab175d5d1ea1bc9d (diff)
downloadgitea-afa8dd45af29f529f3695b4d2bab7ed98ac830db.tar.gz
gitea-afa8dd45af29f529f3695b4d2bab7ed98ac830db.zip
Make git push options accept short name (#32245)
Just like what most CLI parsers do: `--opt` means `opt=true` Then users could use `-o force-push` as `-o force-push=true`
Diffstat (limited to 'routers')
-rw-r--r--routers/private/hook_post_receive.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/hook_post_receive.go b/routers/private/hook_post_receive.go
index 5c01216356..8d12b7a953 100644
--- a/routers/private/hook_post_receive.go
+++ b/routers/private/hook_post_receive.go
@@ -208,7 +208,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
return
}
- cols := make([]string, 0, len(opts.GitPushOptions))
+ cols := make([]string, 0, 2)
if isPrivate.Has() {
repo.IsPrivate = isPrivate.Value()