summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-03-13 22:22:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-18 21:32:55 (GMT)
commitfb52938eec1cf6ec3169152362fe774849f5ac9b (patch)
tree8b2d642a6de67a15bb963c4171688e675deacaa2 /diffcore.h
parenta49b55d52e7dcfd628b6328c9098d734ebe7a97d (diff)
downloadgit-fb52938eec1cf6ec3169152362fe774849f5ac9b.zip
git-fb52938eec1cf6ec3169152362fe774849f5ac9b.tar.gz
git-fb52938eec1cf6ec3169152362fe774849f5ac9b.tar.bz2
merge-ort: record the reason that we want a rename for a directory
When one side of history renames a directory, and the other side of history added files to the old directory, directory rename detection is used to warn about the location of the added files so the user can move them to the old directory or keep them with the new one. This sets up three different types of directories: * directories that had new files added to them * directories underneath a directory that had new files added to them * directories where no new files were added to it or any leading path Save this information in dirs_removed; the next several commits will make use of this information. 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h
index 4f168b3..d5a497b 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -161,6 +161,13 @@ 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
+};
+
void partial_clear_dir_rename_count(struct strmap *dir_rename_count);
void diffcore_break(struct repository *, int);