Repository navigation
feat(git): 以已审阅提交保护强制删除,并保留首次追加多选 - #132
Merged
Merged
Conversation
Return structured unmerged and changed-target errors, require expectedTarget for force deletion, and preserve worktree and atomic ref protections. Keep the selected row when starting Cmd/Ctrl multi-selection.
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.
关联 Issue
Refs 1lck/Lithe-IDEA#2233
类型
改动说明
普通删除遇到未完全合并的本地分支时保留分支,返回稳定码
git_branch_not_merged,并在 details 中返回分支名和完整提交 ID,供宿主展示风险和目标列表、二次确认。git.write/deleteBranch新增expectedTarget;force: true必须携带已审阅的完整 40/64 位对象 ID。分支已移动则以git_branch_changed拒绝。update-ref -d原子删除、恢复目标与分支配置清理。workspace.rowSelection.reduce:先普通点击 A,再 Cmd/Ctrl 点击 B 时保留 A/B;首次点击已选行可取消它,根节点仍受保护。修复前 fixture 明确失败,修复后通过。Git 列表、项目树等共享消费者使用同一规则。宿主负责独立风险确认、默认取消、混合多选只重试未合并项、失败分支名标红。本 PR 不新增插件宿主方法、SDK 或协议版本,不含平台 UI、发布或自动合并操作。
验证
cargo test --manifest-path rust/Cargo.toml -p lithe-core --lib branch_force_delete -- --test-threads=1:2 项通过。cargo test --manifest-path rust/Cargo.toml -p lithe-core --lib shared_row_selection_fixture -- --test-threads=1:共享 fixture 全案例通过;修改前先观察到失败。git_write_records_the_deleted_branch_target通过。cargo test --manifest-path rust/Cargo.toml -p lithe-git -p lithe-protocol -p lithe-row-selection -- --test-threads=1:157 + 8 + 2 项通过。cargo clippy --all-targets -- -D warnings、workspace fmt check、注释规范、平台测试放置检查通过。范围检查