Re: [PATCH v7 13/31] merge-recursive: introduce new functions to handle rename logic
From: Stefan Beller <hidden>
Date: 2018-02-02 23:36:49
From: Stefan Beller <hidden>
Date: 2018-02-02 23:36:49
On Tue, Jan 30, 2018 at 3:25 PM, Elijah Newren [off-list ref] wrote:
The amount of logic in merge_trees() relative to renames was just a few lines, but split it out into new handle_renames() and cleanup_renames() functions to prepare for additional logic to be added to each. No code or logic changes, just a new place to put stuff for when the rename detection gains additional checks. Note that process_renames() records pointers to various information (such as diff_filepairs) into rename_conflict_info structs. Even though the rename string_lists are not directly used once handle_renames() completes, we should not immediately free the lists at the end of that function because they store the information referenced in the rename_conflict_info, which is used later in process_entry(). Thus the reason for a separate cleanup_renames(). Signed-off-by: Elijah Newren <redacted>
Reviewed-by: Stefan Beller <redacted>