[PATCH 2/5] Add another rename + D/F conflict testcase

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

 



From: Alexander Gladysh <agladysh@xxxxxxxxx>

This is a simple testcase where both sides of the rename are paths involved
in (separate) D/F merge conflicts.
---
I hope it's not bad style to take someone else's testcase from the mailing
list and submit it on their behalf as a testsuite addition (nor do I know
what to do about the signed-off-by line in this case).  This is simply the
testcase Alexander Gladysh posted to the list on March 8.  I really like
his example due to how it serves as a simple case where there are two D/F
conflicts with a rename across paths involved in both of those D/F
conflicts.

I'm trying to submit this with Alexander listed as the author, but I'm not
sure how to preserve that when using git-send-email.

 t/t6020-merge-df.sh |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/t/t6020-merge-df.sh b/t/t6020-merge-df.sh
index e71c687..99acb89 100755
--- a/t/t6020-merge-df.sh
+++ b/t/t6020-merge-df.sh
@@ -45,4 +45,36 @@ test_expect_failure 'F/D conflict' '
 	git merge master
 '
 
+test_expect_success 'Setup rename across paths each below D/F conflicts' '
+	git symbolic-ref HEAD refs/heads/newmaster &&
+	rm .git/index &&
+	git clean -fdx &&
+
+	mkdir a &&
+	touch a/f &&
+	git add a &&
+	git commit -m "a" &&
+
+	mkdir b &&
+	ln -s ../a b/a &&
+	git add b &&
+	git commit -m "b" &&
+
+	git checkout -b branch &&
+	rm b/a &&
+	mv a b/ &&
+	ln -s b/a a &&
+	git add . &&
+	git commit -m "swap" &&
+
+	touch f1 &&
+	git add f1 &&
+	git commit -m "f1"
+'
+
+test_expect_failure 'Test rename across paths below D/F conflicts' '
+	git checkout newmaster &&
+	git cherry-pick branch
+'
+
 test_done
-- 
1.7.2.rc0.212.g0c601

--
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]