summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-05-23 21:49:48 +0200
committerGitHub <noreply@github.com>2020-05-23 20:49:48 +0100
commit31df012968bd0acb3ed6748c7bf0f99d8ecc4031 (patch)
treed8a7a2798249129205734e086cd8f01e773de582 /models
parent723b1992711dc55548f0014552cc3b0a98bb86e8 (diff)
downloadgitea-31df012968bd0acb3ed6748c7bf0f99d8ecc4031.tar.gz
gitea-31df012968bd0acb3ed6748c7bf0f99d8ecc4031.zip
Properly handle and return empty string for dangling commits in GetBranchName (#11587)
Diffstat (limited to 'models')
-rw-r--r--models/issue_comment.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index e23fae6715..3f2ee8b7d9 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -1129,7 +1129,7 @@ func getCommitIDsFromRepo(repo *Repository, oldCommitID, newCommitID, baseBranch
return nil, false, err
}
- if oldCommitBranch == "undefined" {
+ if oldCommitBranch == "" {
commitIDs = make([]string, 2)
commitIDs[0] = oldCommitID
commitIDs[1] = newCommitID