Simplify handling of empty diffs

This commit is contained in:
Sven van Heugten 2026-03-05 20:58:51 +01:00
parent 26447c8205
commit 72766295c0
No known key found for this signature in database
GPG key ID: D612F88666F4F660

View file

@ -117,10 +117,6 @@ def main() -> None:
left_out = False
for section in sections:
if not section["hunks"]:
left_out = True
continue
kept_hunks = []
for hunk_lines in section["hunks"]:
filtered = filter_hunk(hunk_lines, search, replace)
@ -132,6 +128,7 @@ def main() -> None:
left_out = True
if not kept_hunks:
left_out = True
continue
output_lines.extend(section["header"])