mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: Extract correct filename from unified diff hunk
This commit is contained in:
parent
f5c4214c93
commit
8b5fc801da
1 changed files with 5 additions and 1 deletions
|
@ -344,7 +344,11 @@ def process_fenced_block(lines, start_line_num):
|
|||
|
||||
if block[0].startswith("--- ") and block[1].startswith("+++ "):
|
||||
# Extract the file path, considering that it might contain spaces
|
||||
fname = block[1][4:].strip()
|
||||
a_fname = block[1][4:].strip()
|
||||
b_fname = block[1][4:].strip()
|
||||
|
||||
# if a_fname starts with a/ and b_fname starts with b/, strip b/ ai!
|
||||
fname = b_fname
|
||||
block = block[2:]
|
||||
else:
|
||||
fname = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue