@@ -247,7 +247,7 @@ class Diff(object):
247
247
(?:^deleted[ ]file[ ]mode[ ](?P<deleted_file_mode>.+)(?:\n|$))?
248
248
(?:^similarity[ ]index[ ]\d+%\n
249
249
^copy[ ]from[ ].*\n
250
- ^copy[ ]to[ ](?P<copied_file_mode >.*)(?:\n|$))?
250
+ ^copy[ ]to[ ](?P<copied_file_name >.*)(?:\n|$))?
251
251
(?:^index[ ](?P<a_blob_id>[0-9A-Fa-f]+)
252
252
\.\.(?P<b_blob_id>[0-9A-Fa-f]+)[ ]?(?P<b_mode>.+)?(?:\n|$))?
253
253
(?:^---[ ](?P<a_path>[^\t\n\r\f\v]*)[\t\r\f\v]*(?:\n|$))?
@@ -427,12 +427,12 @@ def _index_from_patch_format(cls, repo, proc):
427
427
a_path_fallback , b_path_fallback , \
428
428
old_mode , new_mode , \
429
429
rename_from , rename_to , \
430
- new_file_mode , deleted_file_mode , copied_file_mode , \
430
+ new_file_mode , deleted_file_mode , copied_file_name , \
431
431
a_blob_id , b_blob_id , b_mode , \
432
432
a_path , b_path = header .groups ()
433
433
434
434
new_file , deleted_file , copied_file = \
435
- bool (new_file_mode ), bool (deleted_file_mode ), bool (copied_file_mode )
435
+ bool (new_file_mode ), bool (deleted_file_mode ), bool (copied_file_name )
436
436
437
437
a_path = cls ._pick_best_path (a_path , rename_from , a_path_fallback )
438
438
b_path = cls ._pick_best_path (b_path , rename_to , b_path_fallback )
0 commit comments