summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-10-07 11:33:02 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-07 11:33:02 +0900
commit1f4485b2194f662d82968bd6110fa63153df5298 (patch)
tree8b3ef3eb2cda368025b07a0084abf44701ec0960 /t
parentMerge branch 'ps/my-first-contribution-alphasort' (diff)
parentmerge-recursive: symlink's descendants not in way (diff)
downloadtgif-1f4485b2194f662d82968bd6110fa63153df5298.tar.xz
Merge branch 'jt/merge-recursive-symlink-is-not-a-dir-in-way'
A bug in merge-recursive code that triggers when a branch with a symbolic link is merged with a branch that replaces it with a directory has been fixed. * jt/merge-recursive-symlink-is-not-a-dir-in-way: merge-recursive: symlink's descendants not in way
Diffstat (limited to 't')
-rwxr-xr-xt/t3030-merge-recursive.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index ff641b348a..faa8892741 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -452,6 +452,34 @@ test_expect_success 'merge-recursive d/f conflict result' '
'
+test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not produce d/f conflict' '
+ git init sym &&
+ (
+ cd sym &&
+ ln -s . foo &&
+ mkdir bar &&
+ >bar/file &&
+ git add foo bar/file &&
+ git commit -m "foo symlink" &&
+
+ git checkout -b branch1 &&
+ git commit --allow-empty -m "empty commit" &&
+
+ git checkout master &&
+ git rm foo &&
+ mkdir foo &&
+ >foo/bar &&
+ git add foo/bar &&
+ git commit -m "replace foo symlink with real foo dir and foo/bar file" &&
+
+ git checkout branch1 &&
+
+ git cherry-pick master &&
+ test_path_is_dir foo &&
+ test_path_is_file foo/bar
+ )
+'
+
test_expect_success 'reset and 3-way merge' '
git reset --hard "$c2" &&