@@ -1073,7 +1073,6 @@ static int process_renames(struct merge_options *o,
1073
1073
1074
1074
if (try_merge ) {
1075
1075
struct diff_filespec * one , * a , * b ;
1076
- struct merge_file_info mfi ;
1077
1076
src_other .path = (char * )ren1_src ;
1078
1077
1079
1078
one = ren1 -> pair -> one ;
@@ -1084,41 +1083,16 @@ static int process_renames(struct merge_options *o,
1084
1083
b = ren1 -> pair -> two ;
1085
1084
a = & src_other ;
1086
1085
}
1087
- mfi = merge_file (o , one , a , b ,
1088
- o -> branch1 , o -> branch2 );
1089
-
1090
- if (mfi .clean &&
1091
- sha_eq (mfi .sha , ren1 -> pair -> two -> sha1 ) &&
1092
- mfi .mode == ren1 -> pair -> two -> mode ) {
1093
- /*
1094
- * This message is part of
1095
- * t6022 test. If you change
1096
- * it update the test too.
1097
- */
1098
- output (o , 3 , "Skipped %s (merged same as existing)" , ren1_dst );
1099
-
1100
- /* There may be higher stage entries left
1101
- * in the index (e.g. due to a D/F
1102
- * conflict) that need to be resolved.
1103
- */
1104
- if (!ren1 -> dst_entry -> stages [2 ].mode !=
1105
- !ren1 -> dst_entry -> stages [3 ].mode )
1106
- ren1 -> dst_entry -> processed = 0 ;
1107
- } else {
1108
- if (mfi .merge || !mfi .clean )
1109
- output (o , 1 , "Renaming %s => %s" , ren1_src , ren1_dst );
1110
- if (mfi .merge )
1111
- output (o , 2 , "Auto-merging %s" , ren1_dst );
1112
- if (!mfi .clean ) {
1113
- output (o , 1 , "CONFLICT (rename/modify): Merge conflict in %s" ,
1114
- ren1_dst );
1115
- clean_merge = 0 ;
1116
-
1117
- if (!o -> call_depth )
1118
- update_stages (ren1_dst ,
1119
- one , a , b , 1 );
1120
- }
1121
- update_file (o , mfi .clean , mfi .sha , mfi .mode , ren1_dst );
1086
+ update_stages_and_entry (ren1_dst , ren1 -> dst_entry , one , a , b , 1 );
1087
+ if (string_list_has_string (& o -> current_directory_set , ren1_dst )) {
1088
+ setup_rename_df_conflict_info (RENAME_NORMAL ,
1089
+ ren1 -> pair ,
1090
+ NULL ,
1091
+ branch1 ,
1092
+ NULL ,
1093
+ ren1 -> dst_entry ,
1094
+ NULL );
1095
+ remove_file (o , 0 , ren1_dst , 0 );
1122
1096
}
1123
1097
}
1124
1098
}
@@ -1358,6 +1332,11 @@ static int process_df_entry(struct merge_options *o,
1358
1332
struct rename_df_conflict_info * conflict_info = entry -> rename_df_conflict_info ;
1359
1333
char * src ;
1360
1334
switch (conflict_info -> rename_type ) {
1335
+ case RENAME_NORMAL :
1336
+ clean_merge = merge_content (o , path ,
1337
+ o_sha , o_mode , a_sha , a_mode , b_sha , b_mode ,
1338
+ conflict_info -> branch1 );
1339
+ break ;
1361
1340
case RENAME_DELETE :
1362
1341
clean_merge = 0 ;
1363
1342
conflict_rename_delete (o , conflict_info -> pair1 ,
0 commit comments