Skip to content

Commit 64f0b96

Browse files
committed
delete inserted branches during abort
1 parent 9cced6a commit 64f0b96

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/modify/apply.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,9 +1005,9 @@ func Unwind(cfg *config.Config, gitDir string, snapshot Snapshot, stackIndex int
10051005
}
10061006
}
10071007

1008-
// Clean up branches created by renames during the partial apply
1008+
// Clean up branches created by renames or inserts during the partial apply
10091009
for _, action := range plan {
1010-
if action.Type == "rename" && action.NewName != "" {
1010+
if action.NewName != "" && (action.Type == "rename" || action.Type == "insert_below" || action.Type == "insert_above") {
10111011
if !snapshotNames[action.NewName] && git.BranchExists(action.NewName) {
10121012
_ = git.DeleteBranch(action.NewName, true)
10131013
}

0 commit comments

Comments
 (0)