mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
This commit is contained in:
@@ -453,10 +453,15 @@ func PushUpdate(repo *models.Repository, branch string, opts models.PushUpdateOp
|
||||
}
|
||||
}
|
||||
} else if !isDelRef {
|
||||
branchName := opts.RefFullName[len(git.BranchPrefix):]
|
||||
if err = models.RemoveDeletedBranch(repo.ID, branchName); err != nil {
|
||||
log.Error("models.RemoveDeletedBranch %s/%s failed: %v", repo.ID, branchName, err)
|
||||
}
|
||||
|
||||
// If is branch reference
|
||||
|
||||
// Clear cache for branch commit count
|
||||
cache.Remove(repo.GetCommitsCountCacheKey(opts.RefFullName[len(git.BranchPrefix):], true))
|
||||
cache.Remove(repo.GetCommitsCountCacheKey(branchName, true))
|
||||
|
||||
newCommit, err := gitRepo.GetCommit(opts.NewCommitID)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user