feat(branch): delete a branch on its remote#9
Merged
Conversation
Adds a "Delete branch on <remote>" action to the sidebar remote-branch menu, closing the gap where a branch could be pruned locally but not on origin. Core `Repo::delete_remote_branch` runs `git push <remote> --delete refs/heads/<branch>`, shelled out and streamed through the existing `run_git_streaming` (credentials/progress free), mirroring the tag-delete path. The ref is fully-qualified behind a `--` so a stray name cannot be read as a git option. The push also drops the local remote-tracking ref, so a refs refresh clears the sidebar row with no optimistic bookkeeping. Wires `repo_branch_delete_remote` IPC + `repoBranchDeleteRemote` wrapper + `deleteRemoteBranch` store action through to the confirm-gated menu item. Verified with cargo check, tsc, and an end-to-end bare-remote run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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
Adds a Delete branch on
<remote>action to the sidebar remote-branch menu, closing the gap where a branch could be pruned locally but not onorigin.How
network.rs):Repo::delete_remote_branchrunsgit push <remote> --delete refs/heads/<branch>, shelled out and streamed through the existingrun_git_streaming(credentials/progress free), mirroring the tag-delete path. The ref is fully-qualified behind a--so a stray name can't be read as a git option.refs/remotes/<remote>/<branch>tracking ref, so therefreshRefsafter a successful delete clears the sidebar row with no optimistic bookkeeping.repo_branch_delete_remotecommand +repoBranchDeleteRemotewrapper +deleteRemoteBranch(remote, branch)store action → a confirm-gated, danger-styled menu item.Verification
cargo check -p strand-core -p strand-tauri— cleanpnpm --filter ./ui exec tsc --noEmit— cleanDocs:
TASKS.mdrows flipped + dated shipped note inROADMAP.md. README left unchanged (already covered at the right altitude).🤖 Generated with Claude Code