From: Junio C Hamano Date: Thu, 10 Feb 2011 00:41:16 +0000 (-0800) Subject: Merge branch 'jn/cherry-pick-strategy-option' X-Git-Tag: v1.7.5-rc0~147 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/06938a37dca9bb19784c1bd41e90c99a7c8f8e5e?ds=inline;hp=-c Merge branch 'jn/cherry-pick-strategy-option' * jn/cherry-pick-strategy-option: cherry-pick/revert: add support for -X/--strategy-option --- 06938a37dca9bb19784c1bd41e90c99a7c8f8e5e diff --combined t/t3032-merge-recursive-options.sh index 44f5421be4,796f616abf..2b17311cb0 --- a/t/t3032-merge-recursive-options.sh +++ b/t/t3032-merge-recursive-options.sh @@@ -13,19 -13,16 +13,19 @@@ test_description='merge-recursive optio . ./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 " "$@" } && @@@ -110,6 -107,20 +110,20 @@@ test_expect_success '--ignore-space-cha 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