fix: branch 强制删除,解决未合并的分支无法删除问题

This commit is contained in:
shizhendong
2024-10-18 15:23:09 +08:00
parent d09ab8483c
commit 6c6327382f

View File

@@ -198,6 +198,7 @@ public class GitServiceImpl implements IGitService {
try (Git git = this.getGitInstance(repoDir)) {
git.branchDelete()
.setBranchNames(branchName)
.setForce(true)
.call();
} catch (GitAPIException e) {
log.error(e, "[deleteBranch] [error] [workspaceId: {}] [branchName: {}]", workspaceId, branchName);