]> git.ipfire.org Git - thirdparty/git.git/blobdiff - merge-recursive.c
Merge branch 'cc/multi-promisor'
[thirdparty/git.git] / merge-recursive.c
index 12300131fc12b15fbc9514e90ca45d76113d7267..22a12cfeba381d184db376301ac7b19d66f80e85 100644 (file)
@@ -764,7 +764,8 @@ static int dir_in_way(struct index_state *istate, const char *path,
 
        strbuf_release(&dirpath);
        return check_working_copy && !lstat(path, &st) && S_ISDIR(st.st_mode) &&
-               !(empty_ok && is_empty_dir(path));
+               !(empty_ok && is_empty_dir(path)) &&
+               !has_symlink_leading_path(path, strlen(path));
 }
 
 /*
@@ -2863,7 +2864,8 @@ static int detect_and_process_renames(struct merge_options *opt,
        head_pairs = get_diffpairs(opt, common, head);
        merge_pairs = get_diffpairs(opt, common, merge);
 
-       if (opt->detect_directory_renames) {
+       if ((opt->detect_directory_renames == 2) ||
+           (opt->detect_directory_renames == 1 && !opt->call_depth)) {
                dir_re_head = get_directory_renames(head_pairs);
                dir_re_merge = get_directory_renames(merge_pairs);