aboutsummaryrefslogtreecommitdiffstats
path: root/merge-ort.c
diff options
context:
space:
mode:
Diffstat (limited to 'merge-ort.c')
-rw-r--r--merge-ort.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/merge-ort.c b/merge-ort.c
index a37c1c19ac..3855f9de25 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -2292,10 +2292,16 @@ static char *check_for_directory_rename(struct merge_options *opt,
struct strmap_entry *rename_info;
struct strmap_entry *otherinfo;
const char *new_dir;
+ int other_side = 3 - side_index;
- /* Cases where we don't have a directory rename for this path */
+ /*
+ * Cases where we don't have or don't want a directory rename for
+ * this path.
+ */
if (strmap_empty(dir_renames))
return NULL;
+ if (strmap_get(&collisions[other_side], path))
+ return NULL;
rename_info = check_dir_renamed(path, dir_renames);
if (!rename_info)
return NULL;