git-sync-web 自动提交 2026-09-09 15:27:47
This commit is contained in:
@@ -632,6 +632,7 @@ function parseUnifiedDiff(text) {
|
||||
const files = [];
|
||||
let cur = null;
|
||||
let oldNo = 0, newNo = 0;
|
||||
let inHunk = false; // 词级模式(--word-diff=plain)下 git 的上下文行不带前导空格,需据此兜底
|
||||
const push = (header) => { cur = { header, rows: [] }; files.push(cur); return cur; };
|
||||
for (const line of lines) {
|
||||
if (line.startsWith('diff --git') || line.startsWith('Index: ')) { push(line); continue; }
|
||||
|
||||
Reference in New Issue
Block a user