+struct rename_info {
+ struct string_list *head_renames;
+ struct string_list *merge_renames;
+};
+
+static int handle_renames(struct merge_options *o,
+ struct tree *common,
+ struct tree *head,
+ struct tree *merge,
+ struct string_list *entries,
+ struct rename_info *ri)
+{
+ ri->head_renames = get_renames(o, head, common, head, merge, entries);
+ ri->merge_renames = get_renames(o, merge, common, head, merge, entries);
+ return process_renames(o, ri->head_renames, ri->merge_renames);
+}
+
+static void cleanup_renames(struct rename_info *re_info)
+{
+ string_list_clear(re_info->head_renames, 0);
+ string_list_clear(re_info->merge_renames, 0);
+
+ free(re_info->head_renames);
+ free(re_info->merge_renames);
+}
+