X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3032-merge-recursive-options.sh;h=2b17311cb0870ea210d9b5cbe167363d13641d67;hb=42e3086bf6cf054b9a437235e8b9669b22478d08;hp=2293797553d49c5221da10ca17f97eeba1f5d29d;hpb=9f5074e0348071532911cffb622d7df6754a9743;p=git.git diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh index 229379755..2b17311cb 100755 --- a/t/t3032-merge-recursive-options.sh +++ b/t/t3032-merge-recursive-options.sh @@ -13,16 +13,19 @@ test_description='merge-recursive options . ./test-lib.sh +test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b +test_have_prereq MINGW && export GREP_OPTIONS=-U + test_expect_success 'setup' ' conflict_hunks () { - sed -n -e " - /^<<<>>>/ b n - b inconflict + b conflict " "$@" } && @@ -107,6 +110,20 @@ test_expect_success '--ignore-space-change makes merge succeed' ' git merge-recursive --ignore-space-change HEAD^ -- HEAD remote ' +test_expect_success 'naive cherry-pick fails' ' + git read-tree --reset -u HEAD && + test_must_fail git cherry-pick --no-commit remote && + git read-tree --reset -u HEAD && + test_must_fail git cherry-pick remote && + test_must_fail git update-index --refresh && + grep "<<<<<<" text.txt +' + +test_expect_success '-Xignore-space-change makes cherry-pick succeed' ' + git read-tree --reset -u HEAD && + git cherry-pick --no-commit -Xignore-space-change remote +' + test_expect_success '--ignore-space-change: our w/s-only change wins' ' q_to_cr <<-\EOF >expected && justice and holiness and is the nurse of his age and theQ