summaryrefslogtreecommitdiffstats
path: root/modules/repository/repo.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-01-12 21:37:46 +0100
committerGitHub <noreply@github.com>2022-01-12 20:37:46 +0000
commitff00b8688bf2a918a975c49081868815919b1793 (patch)
treef9be8a9eb214a95f7c7512fc5da4ae9f04497aad /modules/repository/repo.go
parent67d73882f4ade433fa8292784a5f5d0b8df50cb6 (diff)
downloadgitea-ff00b8688bf2a918a975c49081868815919b1793.tar.gz
gitea-ff00b8688bf2a918a975c49081868815919b1793.zip
Fix NPE on try to get tag reference via API (#18245)
* fix npe * rm gitRepo from Tag
Diffstat (limited to 'modules/repository/repo.go')
-rw-r--r--modules/repository/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/repository/repo.go b/modules/repository/repo.go
index d04cd28a59..eb3f58e937 100644
--- a/modules/repository/repo.go
+++ b/modules/repository/repo.go
@@ -296,7 +296,7 @@ func PushUpdateAddTag(repo *repo_model.Repository, gitRepo *git.Repository, tagN
if err != nil {
return fmt.Errorf("GetTag: %v", err)
}
- commit, err := tag.Commit()
+ commit, err := tag.Commit(gitRepo)
if err != nil {
return fmt.Errorf("Commit: %v", err)
}