mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-14 03:29:55 +00:00
fix: git cmd (#38084)
This commit is contained in:
@@ -47,7 +47,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
|
||||
repo *repo_model.Repository
|
||||
gitRepo *git.Repository
|
||||
)
|
||||
defer gitRepo.Close() // it's safe to call Close on a nil pointer
|
||||
defer func() { _ = gitRepo.Close() }() // it's safe to call Close on a nil pointer, but it needs to use the latest value
|
||||
|
||||
updates := make([]*repo_module.PushUpdateOptions, 0, len(opts.OldCommitIDs))
|
||||
wasEmpty := false
|
||||
|
||||
Reference in New Issue
Block a user