fix(source-control): 修复 DiffViewer 中 staged/unstaged 文件模型路径冲突#430
Merged
Conversation
将非 commit 视图下的 `original/modified` 虚拟路径按 `staged/unstaged` 区分,避免同一路径导致 diff 同步异常。
Contributor
|
I'll analyze this and get back to you. |
- 使用 diff 签名(含 staged/unstaged、commit/worktree)判断变更,避免误判导致不刷新 - 在 diff-ready 与手动拉取 lineChanges 后强制刷新 `hideUnchangedRegions`,并增加 rAF 调度与卸载清理
Contributor
|
I'll analyze this and get back to you. |
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.

original/modified虚拟路径按staged/unstaged区分,避免同一路径导致 diff 同步异常。具体体现是现在在版本管理下的更改文件,右边的内容经常不是最新的内容,比如


正确的 diff 应该是这样的