aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--merge-recursive.c5
-rwxr-xr-xt/t3512-cherry-pick-submodule.sh2
2 files changed, 4 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 1d3f8f0d2..9fb0b9f8f 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1901,8 +1901,9 @@ static int process_entry(struct merge_options *o,
oid = b_oid;
conf = _("directory/file");
}
- if (dir_in_way(path, !o->call_depth,
- S_ISGITLINK(a_mode))) {
+ if (dir_in_way(path,
+ !o->call_depth && !S_ISGITLINK(a_mode),
+ 0)) {
char *new_path = unique_path(o, path, add_branch);
clean_merge = 0;
output(o, 1, _("CONFLICT (%s): There is a directory with name %s in %s. "
diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
index 1b1e31100..ce48c4fcc 100755
--- a/t/t3512-cherry-pick-submodule.sh
+++ b/t/t3512-cherry-pick-submodule.sh
@@ -10,7 +10,7 @@ KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
test_submodule_switch "git cherry-pick"
-test_expect_failure 'unrelated submodule/file conflict is ignored' '
+test_expect_success 'unrelated submodule/file conflict is ignored' '
test_create_repo sub &&
touch sub/file &&