summaryrefslogtreecommitdiff
path: root/merge-ort.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-12-14 16:21:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-14 16:45:58 (GMT)
commit864075ec433644e5908589fe79f8b3296f896867 (patch)
tree29d571e93b0d387c35b8ec3f926086013cd6381d /merge-ort.c
parentc5a6f65527aa3b6f5d7cf25437a88d8727ab0646 (diff)
downloadgit-864075ec433644e5908589fe79f8b3296f896867.zip
git-864075ec433644e5908589fe79f8b3296f896867.tar.gz
git-864075ec433644e5908589fe79f8b3296f896867.tar.bz2
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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ort.c')
-rw-r--r--merge-ort.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/merge-ort.c b/merge-ort.c
index 414e7b7..1c1a7fa 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -46,6 +46,25 @@ enum merge_side {
MERGE_SIDE2 = 2
};
+struct rename_info {
+ /*
+ * pairs: pairing of filenames from diffcore_rename()
+ *
+ * Index 1 and 2 correspond to sides 1 & 2 as used in
+ * conflict_info.stages. Index 0 unused.
+ */
+ struct diff_queue_struct pairs[3];
+
+ /*
+ * needed_limit: value needed for inexact rename detection to run
+ *
+ * If the current rename limit wasn't high enough for inexact
+ * rename detection to run, this records the limit needed. Otherwise,
+ * this value remains 0.
+ */
+ int needed_limit;
+};
+
struct merge_options_internal {
/*
* paths: primary data structure in all of merge ort.
@@ -114,6 +133,11 @@ struct merge_options_internal {
struct strmap output;
/*
+ * renames: various data relating to rename detection
+ */
+ struct rename_info renames;
+
+ /*
* current_dir_name: temporary var used in collect_merge_info_callback()
*
* Used to set merged_info.directory_name; see documentation for that