summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-03-13 22:22:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-18 21:32:55 (GMT)
commita49b55d52e7dcfd628b6328c9098d734ebe7a97d (patch)
tree349fb56f1cf7700d6218e011c1627eb41f3e4b19 /diffcore.h
parentae1db7b31c54c95b1ecb2005f7a37e3645ec9eda (diff)
downloadgit-a49b55d52e7dcfd628b6328c9098d734ebe7a97d.zip
git-a49b55d52e7dcfd628b6328c9098d734ebe7a97d.tar.gz
git-a49b55d52e7dcfd628b6328c9098d734ebe7a97d.tar.bz2
merge-ort, diffcore-rename: tweak dirs_removed and relevant_source type
As noted in the previous commit, we want to be able to take advantage of the "majority rules" portion of directory rename detection to avoid detecting more renames than necessary. However, for diffcore-rename to take advantage of that, it needs to know whether a rename source file was needed for just directory rename detection reasons, or if it is wanted for potential three-way content merging. Modify relevant_sources from a strset to a strintmap, so we can encode additional information. We also modify dirs_removed from a strset to a strintmap at the same time because trying to determine what files are needed for directory rename detection will require us tracking a bit more information for each directory. This commit only changes the types of the two variables from strset to strintmap; it does not actually store any special values yet and for now only checks for presence of entries in the strintmap. Thus, the code is functionally identical to how it behaved before. Future commits will start associating values with each key for these two maps. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/diffcore.h b/diffcore.h
index 737c93a..4f168b3 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
@@ -166,8 +166,8 @@ 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 *);