summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-04-16 20:53:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-16 20:53:33 (GMT)
commite2e1a03f6b9c0869e64710c94fc43df82a06f0c8 (patch)
tree0ce8a1ab943bbf216f9f6c8d5628337b3c6016b7 /diffcore.h
parentd1b10fc6d84d49796026e567833b88c7f8886c35 (diff)
parent9bd342137eb4dfe3852f657f8afcc637e68b1439 (diff)
downloadgit-e2e1a03f6b9c0869e64710c94fc43df82a06f0c8.zip
git-e2e1a03f6b9c0869e64710c94fc43df82a06f0c8.tar.gz
git-e2e1a03f6b9c0869e64710c94fc43df82a06f0c8.tar.bz2
Merge branch 'en/ort-perf-batch-10'
Various rename detection optimization to help "ort" merge strategy backend. * en/ort-perf-batch-10: diffcore-rename: determine which relevant_sources are no longer relevant merge-ort: record the reason that we want a rename for a file diffcore-rename: add computation of number of unknown renames diffcore-rename: check if we have enough renames for directories early on diffcore-rename: only compute dir_rename_count for relevant directories merge-ort: record the reason that we want a rename for a directory merge-ort, diffcore-rename: tweak dirs_removed and relevant_source type diffcore-rename: take advantage of "majority rules" to skip more renames
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/diffcore.h b/diffcore.h
index d76982f..f5c6de4 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -8,8 +8,8 @@
struct diff_options;
struct repository;
+struct strintmap;
struct strmap;
-struct strset;
struct userdiff_driver;
/* This header file is internal between diff.c and its diff transformers
@@ -161,13 +161,26 @@ struct diff_filepair *diff_queue(struct diff_queue_struct *,
struct diff_filespec *);
void diff_q(struct diff_queue_struct *, struct diff_filepair *);
+/* dir_rename_relevance: the reason we want rename information for a dir */
+enum dir_rename_relevance {
+ NOT_RELEVANT = 0,
+ RELEVANT_FOR_ANCESTOR = 1,
+ RELEVANT_FOR_SELF = 2
+};
+/* file_rename_relevance: the reason(s) we want rename information for a file */
+enum file_rename_relevance {
+ RELEVANT_NO_MORE = 0, /* i.e. NOT relevant */
+ RELEVANT_CONTENT = 1,
+ RELEVANT_LOCATION = 2
+};
+
void partial_clear_dir_rename_count(struct strmap *dir_rename_count);
void diffcore_break(struct repository *, int);
void diffcore_rename(struct diff_options *);
void diffcore_rename_extended(struct diff_options *options,
- struct strset *relevant_sources,
- struct strset *dirs_removed,
+ struct strintmap *relevant_sources,
+ struct strintmap *dirs_removed,
struct strmap *dir_rename_count);
void diffcore_merge_broken(void);
void diffcore_pickaxe(struct diff_options *);