Skip to content

Commit 184c923

Browse files
committed
delete inserted branches during abort
1 parent ebaac19 commit 184c923

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
@@ -1004,9 +1004,9 @@ func Unwind(cfg *config.Config, gitDir string, snapshot Snapshot, stackIndex int
10041004
}
10051005
}
10061006

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

0 commit comments

Comments
 (0)