git-sync-web 自动提交 2026-09-09 15:06:45
This commit is contained in:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user