python-unidiff icon indicating copy to clipboard operation
python-unidiff copied to clipboard

Incorrectly check diff git line for git renamed files

Open Windsland52 opened this issue 1 year ago • 0 comments

diff --git "a/docs/zh_cn/develop/Bug \346\216\222\346\237\245.md" "b/docs/zh_cn/develop/Bug \346\216\222\346\237\245.md"

In this case, patched_file is incorrectly parsed as is_rename is True. patched_file.source_file is '"a/docs/zh_cn/develop/Bug \346\216\222\346\237\245.md" "b/docs/zh_cn/develop/Bug' and patched_file.target_file is '\346\216\222\346\237\245.md"'

Maybe you need to modify the regular expression to handle quotes and spaces correctly

Windsland52 avatar Dec 23 '24 23:12 Windsland52