Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gladysh <agladysh@gmail.com>2010-07-09 17:10:52 +0400
committerJunio C Hamano <gitster@pobox.com>2010-07-10 03:11:13 +0400
commitf433f70547ebf038a862ca72565ae42e50d4adfa (patch)
tree23914cfee619aefe16136d3e3ecbb034064b3aa8 /t/t3509-cherry-pick-merge-df.sh
parentf15652d90c37ca56db08d325c871f2cc8f7d509e (diff)
Add a rename + D/F conflict testcase
This is a simple testcase where both sides of the rename are paths involved in (separate) D/F merge conflicts Signed-off-by: Alexander Gladysh <agladysh@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3509-cherry-pick-merge-df.sh')
-rwxr-xr-xt/t3509-cherry-pick-merge-df.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh
new file mode 100755
index 0000000000..7c05e16843
--- /dev/null
+++ b/t/t3509-cherry-pick-merge-df.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+test_description='Test cherry-pick with directory/file conflicts'
+. ./test-lib.sh
+
+test_expect_success 'Setup rename across paths each below D/F conflicts' '
+ mkdir a &&
+ >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/a &&
+ ln -s b/a a &&
+ git add . &&
+ git commit -m swap &&
+
+ >f1 &&
+ git add f1 &&
+ git commit -m f1
+'
+
+test_expect_failure 'Cherry-pick succeeds with rename across D/F conflicts' '
+ git reset --hard &&
+ git checkout master^0 &&
+ git cherry-pick branch
+'
+
+test_done