fix(dream): ignore line-ending-only memory diffs
This commit is contained in:
1 parent
6b5820ea89
commit
ed47cf1562
2 files changed
+38
-3
No files matched your search
@@ -377,12 +377,16 @@ class GitStore:
|
||||
changed += 1
|
||||
summary_lines.append(f"{path}: binary or non-UTF-8 file changed")
|
||||
continue
|
||||
if head_text == wt_text:
|
||||
# Git blobs preserve line endings while read_text() normalizes
|
||||
# them. Compare the same logical lines used by the diff.
|
||||
head_lines = head_text.splitlines()
|
||||
wt_lines = wt_text.splitlines()
|
||||
if head_lines == wt_lines:
|
||||
continue
|
||||
changed += 1
|
||||
hunks = list(difflib.unified_diff(
|
||||
head_text.splitlines(),
|
||||
wt_text.splitlines(),
|
||||
head_lines,
|
||||
wt_lines,
|
||||
fromfile=path,
|
||||
tofile=path,
|
||||
lineterm="",
|
||||
|
||||
Reference in new issue
Block a user