File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1025,13 +1025,17 @@ static int check_filenames(git_patch_parsed *patch)
10251025 /* Prefer the rename filenames as they are unambiguous and unprefixed */
10261026 if (patch -> rename_old_path )
10271027 patch -> base .delta -> old_file .path = patch -> rename_old_path ;
1028- else
1028+ else if ( prefixed_old )
10291029 patch -> base .delta -> old_file .path = prefixed_old + old_prefixlen ;
1030+ else
1031+ patch -> base .delta -> old_file .path = NULL ;
10301032
10311033 if (patch -> rename_new_path )
10321034 patch -> base .delta -> new_file .path = patch -> rename_new_path ;
1033- else
1035+ else if ( prefixed_new )
10341036 patch -> base .delta -> new_file .path = prefixed_new + new_prefixlen ;
1037+ else
1038+ patch -> base .delta -> new_file .path = NULL ;
10351039
10361040 if (!patch -> base .delta -> old_file .path &&
10371041 !patch -> base .delta -> new_file .path )
You can’t perform that action at this time.
0 commit comments