1
0
Fork 0
forked from forgejo/forgejo

Properly handle and return empty string for dangling commits in GetBranchName (#11587)

This commit is contained in:
Cirno the Strongest 2020-05-23 21:49:48 +02:00 committed by GitHub
parent 723b199271
commit 31df012968
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View file

@ -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