Closed klnusbaum closed 1 month ago
Yeah, I think the "PR was merged, delete the branch" handling needs to batch-delete the contiguous parts of the stack. It also needs to determine the deletion ordering. I suspected this would be a problem, but hadn't run into it yet:
In my repo, I was a branch for stack X. While I was there, I merged a bunch of branches for Stack Y. I then ran
gs rs && gs br
. My intent was to delete all of the merged branches in Stack Y, and then restack Stack X on the new master. I noticed that instead of simply deleting all of the branches in Stack Y (now that they were all merged), git-spice proceeded to delete them one-by-one, and do a restack operations for the rest of the stack each time (and for some reason, the deleting of the last two branches failed). See:When several or all of the branches in a stack are deleted, I would expect only necessary restacking to occur.