mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 02:21:17 +02:00
Fix deleted branch isn't removed when push the branch again (#9516)
This commit is contained in:
1 parent
e3a5b83212
commit
0bcf644da4
2 files changed
+12
No files matched your search
@@ -520,6 +520,12 @@ func PushUpdates(repo *models.Repository, optsList []*PushUpdateOptions) error {
|
||||
}
|
||||
}
|
||||
|
||||
if opts.NewCommitID != git.EmptySHA {
|
||||
if err = models.RemoveDeletedBranch(repo.ID, opts.Branch); err != nil {
|
||||
log.Error("models.RemoveDeletedBranch %s/%s failed: %v", repo.ID, opts.Branch, err)
|
||||
}
|
||||
}
|
||||
|
||||
log.Trace("TriggerTask '%s/%s' by %s", repo.Name, opts.Branch, pusher.Name)
|
||||
|
||||
go pull_service.AddTestPullRequestTask(pusher, repo.ID, opts.Branch, true)
|
||||
|
||||
Reference in new issue
Block a user