diff options
author | Elijah Newren <newren@gmail.com> | 2021-03-13 23:22:03 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-18 22:32:55 +0100 |
commit | fb52938eec1cf6ec3169152362fe774849f5ac9b (patch) | |
tree | 8b2d642a6de67a15bb963c4171688e675deacaa2 /diffcore-rename.c | |
parent | merge-ort, diffcore-rename: tweak dirs_removed and relevant_source type (diff) | |
download | git-fb52938eec1cf6ec3169152362fe774849f5ac9b.tar.xz git-fb52938eec1cf6ec3169152362fe774849f5ac9b.zip |
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-rename.c')
-rw-r--r-- | diffcore-rename.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index 6487825317..fafec66b29 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -667,7 +667,7 @@ static void cleanup_dir_rename_info(struct dir_rename_info *info, const char *source_dir = entry->key; struct strintmap *counts = entry->value; - if (!strintmap_contains(dirs_removed, source_dir)) { + if (!strintmap_get(dirs_removed, source_dir)) { string_list_append(&to_remove, source_dir); strintmap_clear(counts); continue; |