Skip to content

Commit 864075e

Browse files
newrengitster
authored andcommitted
merge-ort: add basic data structures for handling renames
This will grow later, but we only need a few fields for basic rename handling. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c5a6f65 commit 864075e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

merge-ort.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,25 @@ enum merge_side {
4646
MERGE_SIDE2 = 2
4747
};
4848

49+
struct rename_info {
50+
/*
51+
* pairs: pairing of filenames from diffcore_rename()
52+
*
53+
* Index 1 and 2 correspond to sides 1 & 2 as used in
54+
* conflict_info.stages. Index 0 unused.
55+
*/
56+
struct diff_queue_struct pairs[3];
57+
58+
/*
59+
* needed_limit: value needed for inexact rename detection to run
60+
*
61+
* If the current rename limit wasn't high enough for inexact
62+
* rename detection to run, this records the limit needed. Otherwise,
63+
* this value remains 0.
64+
*/
65+
int needed_limit;
66+
};
67+
4968
struct merge_options_internal {
5069
/*
5170
* paths: primary data structure in all of merge ort.
@@ -113,6 +132,11 @@ struct merge_options_internal {
113132
*/
114133
struct strmap output;
115134

135+
/*
136+
* renames: various data relating to rename detection
137+
*/
138+
struct rename_info renames;
139+
116140
/*
117141
* current_dir_name: temporary var used in collect_merge_info_callback()
118142
*

0 commit comments

Comments
 (0)