diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-10-12 13:42:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-12 05:42:10 +0000 |
commit | afa8dd45af29f529f3695b4d2bab7ed98ac830db (patch) | |
tree | 88773f35c396edf78ad8910fd9e068ca5f2eadcc /routers | |
parent | 900ac622514081b90e08135cab175d5d1ea1bc9d (diff) | |
download | gitea-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.go | 2 |
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() |