aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-24 09:08:13 +0000
committerGitHub <noreply@github.com>2021-11-24 04:08:13 -0500
commit4e7ca946da2a2642a62f114825129bf5d7ed9196 (patch)
tree7e3a4b41060853a20b89fce9a3e30dded707890b /routers
parentc97d66d23cf14e88514cccb88c393d21db51ab7a (diff)
downloadgitea-4e7ca946da2a2642a62f114825129bf5d7ed9196.tar.gz
gitea-4e7ca946da2a2642a62f114825129bf5d7ed9196.zip
Use `*PushUpdateOptions` as receiver (#17724)
Diffstat (limited to 'routers')
-rw-r--r--routers/private/hook_post_receive.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/private/hook_post_receive.go b/routers/private/hook_post_receive.go
index 4dbe74a9aa..0d559250ea 100644
--- a/routers/private/hook_post_receive.go
+++ b/routers/private/hook_post_receive.go
@@ -57,7 +57,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
wasEmpty = repo.IsEmpty
}
- option := repo_module.PushUpdateOptions{
+ option := &repo_module.PushUpdateOptions{
RefFullName: refFullName,
OldCommitID: opts.OldCommitIDs[i],
NewCommitID: opts.NewCommitIDs[i],
@@ -66,11 +66,11 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
RepoUserName: ownerName,
RepoName: repoName,
}
- updates = append(updates, &option)
+ updates = append(updates, option)
if repo.IsEmpty && option.IsBranch() && (option.BranchName() == "master" || option.BranchName() == "main") {
// put the master/main branch first
copy(updates[1:], updates)
- updates[0] = &option
+ updates[0] = option
}
}
}