File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,42 @@ enum merge_side {
49
49
};
50
50
51
51
struct rename_info {
52
+ /*
53
+ * All variables that are arrays of size 3 correspond to data tracked
54
+ * for the sides in enum merge_side. Index 0 is almost always unused
55
+ * because we often only need to track information for MERGE_SIDE1 and
56
+ * MERGE_SIDE2 (MERGE_BASE can't have rename information since renames
57
+ * are determined relative to what changed since the MERGE_BASE).
58
+ */
59
+
52
60
/*
53
61
* pairs: pairing of filenames from diffcore_rename()
54
- *
55
- * Index 1 and 2 correspond to sides 1 & 2 as used in
56
- * conflict_info.stages. Index 0 unused.
57
62
*/
58
63
struct diff_queue_struct pairs [3 ];
59
64
65
+ /*
66
+ * dirs_removed: directories removed on a given side of history.
67
+ */
68
+ struct strset dirs_removed [3 ];
69
+
70
+ /*
71
+ * dir_rename_count: tracking where parts of a directory were renamed to
72
+ *
73
+ * When files in a directory are renamed, they may not all go to the
74
+ * same location. Each strmap here tracks:
75
+ * old_dir => {new_dir => int}
76
+ * That is, dir_rename_count[side] is a strmap to a strintmap.
77
+ */
78
+ struct strmap dir_rename_count [3 ];
79
+
80
+ /*
81
+ * dir_renames: computed directory renames
82
+ *
83
+ * This is a map of old_dir => new_dir and is derived in part from
84
+ * dir_rename_count.
85
+ */
86
+ struct strmap dir_renames [3 ];
87
+
60
88
/*
61
89
* needed_limit: value needed for inexact rename detection to run
62
90
*
You can’t perform that action at this time.
0 commit comments