Simplify handling of empty diffs
This commit is contained in:
parent
26447c8205
commit
72766295c0
1 changed files with 1 additions and 4 deletions
|
|
@ -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"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue