[PATCH 1/2] t6031: Add a testcase covering multiple renames across a D/F conflict

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
---
 t/t6031-merge-recursive.sh |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/t/t6031-merge-recursive.sh b/t/t6031-merge-recursive.sh
index 8a3304f..aa235b9 100755
--- a/t/t6031-merge-recursive.sh
+++ b/t/t6031-merge-recursive.sh
@@ -57,4 +57,32 @@ test_expect_success FILEMODE 'verify executable bit on file' '
 	test -x file2
 '
 
+test_expect_failure 'merging with triple rename across D/F conflict' '
+	git reset --hard HEAD &&
+	git checkout --orphan main &&
+	git rm -rf . &&
+
+	echo "just a file" > sub1 &&
+	mkdir -p sub2 &&
+	echo content > sub2/file1 &&
+	echo content > sub2/file2 &&
+	echo content > sub2/file3 &&
+	mkdir simple &&
+	echo base > simple/bar &&
+	git add -A &&
+	git commit -m base &&
+
+	git checkout -b other &&
+	echo more >> simple/bar &&
+	git commit -a -m changesimplefile &&
+
+	git checkout main &&
+	git rm sub1 &&
+	git mv sub2 sub1 &&
+	git commit -m changefiletodir &&
+
+	git merge other
+'
+
+
 test_done
-- 
1.7.2.1.227.g086c8

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]