git-sync-web 自动提交 2026-09-09 15:06:45

This commit is contained in:
tamakyi
2026-09-09 15:06:45 +08:00
parent a1ccd4fe6a
commit 86c11864f0
10 changed files with 204 additions and 7 deletions
+2
View File
@@ -1431,8 +1431,10 @@ func (e *Engine) WorkingDiff(name, scope, rel, mode string) (*DiffResult, error)
args = []string{"diff", "--no-color"}
}
// 词级差异:--word-diff=plain 用 [-x-] / {+x+} 标记行内改动
// 注意:该模式下 git 输出的上下文行不带前导空格,前端解析需兼容(见 parseUnifiedDiff)
if mode == "word" {
args = append(args, "--word-diff=plain")
res.Word = true
}
statArgs := append([]string{}, args...)
if scope == "remote" {