[PATCH 2/2] Add tests for cherry-pick d/f conflict which should be none
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:22
Subsystem:
the rest · Maintainer:
Linus Torvalds
This tests that we fixed the problem when a directory was renamed, and a symlink was added in its place (or for that matter, if the type changed in one branch, and the name in another). Signed-off-by: Johannes Schindelin <redacted> --- The last test checks that also a file/symlink conflict does not break cherry-pick, if one side had a clean rename. t/t3502-cherry-pick.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) create mode 100755 t/t3502-cherry-pick.sh
diff --git a/t/t3502-cherry-pick.sh b/t/t3502-cherry-pick.sh
new file mode 100755
index 0000000..9921de5
--- /dev/null
+++ b/t/t3502-cherry-pick.sh@@ -0,0 +1,43 @@ +#!/bin/sh + +test_description='test cherry-pick' + +. ./test-lib.sh + +test_expect_success setup ' + echo foo > file && + ln -s dangling link && + git add file link && + test_tick && + git commit -m foo && + git checkout -b branch && + git rm link && + test_tick && + git commit -m "remove link" && + mkdir link && + echo bar > link/file && + git add link/file && + test_tick && + git commit -m "add dir" && + echo bar > file && + git commit -m "change file" file && + git checkout master +' + +test_expect_success 'cherry-pick ignores unrelated dir/symlink conflict' ' + git cherry-pick branch +' + +test_expect_success 'cherry-pick ignores unrelated file/symlink conflict' ' + git checkout -b branch2 master^ && + git rm link && + test_tick && + git commit -m "remove link" && + : > link && + git add link && + test_tick && + git commit -m "add file" && + git cherry-pick master +' + +test_done
--
1.5.3.rc1.16.g9d6f-dirty