mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-06 05:40:38 +08:00
fix: ensure non-empty lines are processed correctly in git patch handling
This commit is contained in:
@ -164,9 +164,10 @@ def omit_deletion_hunks(patch_lines) -> str:
|
|||||||
inside_hunk = True
|
inside_hunk = True
|
||||||
else:
|
else:
|
||||||
temp_hunk.append(line)
|
temp_hunk.append(line)
|
||||||
edit_type = line[0]
|
if line:
|
||||||
if edit_type == '+':
|
edit_type = line[0]
|
||||||
add_hunk = True
|
if edit_type == '+':
|
||||||
|
add_hunk = True
|
||||||
if inside_hunk and add_hunk:
|
if inside_hunk and add_hunk:
|
||||||
added_patched.extend(temp_hunk)
|
added_patched.extend(temp_hunk)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user