Repository navigation
feat(branches): clean up all merged local branches - #78
Merged
Merged
Conversation
The Branches heading gets "Clean up N merged", the local counterpart to the one each remote got. It deletes every merged branch on screen that a row's own Delete would, skipping the current branch, mainline, branches held by another worktree, integration branches and ones with no commits. Remote copies stay. Like the remote sweep it asks first, listing the branches, since it deletes ones the click never named. BranchOps.deleteMany runs chunked `git branch -D` and reads back which branches are left rather than parsing git's (translated) messages, so a branch git refuses is named in the toast with its reason. Signed-off-by: Raman Gupta <rocketraman@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The local Branches heading gets "· Clean up N merged", the local counterpart to the remote sweep added in #77.
Popup.Confirm.details), as the remote one does. A squash-merged branch's original commits go with it; its changes are in mainline.BranchOps.deleteManyrunsgit branch -Din chunks (sharing the Windows command-line chunk size), then reads back which refs remain instead of parsing git's translated output. A refused branch (say, checked out in a worktree after the list loaded) is named in the toast with git's reason.AppState.cleaningBranches/deleteMergedBranches; the link reads "Cleaning up…" while it runs.Testing
BranchOpsTestcases: full delete, and partial delete where git refuses a branch held by a worktree../gradlew test: 254 tests, 0 failures (from the result XML).