diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-12-10 18:51:44 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-28 11:27:56 -0800 |
commit | 67ac1e1d57e45899a4dfd900a0249f48507584b5 (patch) | |
tree | 075c4365710ef649485d83a3ba7add0e04aaa4b1 /t | |
parent | Merge branch 'rj/maint-difftool-cygwin-workaround' (diff) | |
download | tgif-67ac1e1d57e45899a4dfd900a0249f48507584b5.tar.xz |
cherry-pick/revert: add support for -X/--strategy-option
For example, this would allow cherry-picking or reverting patches from
a piece of history with a different end-of-line style, like so:
$ git revert -Xrenormalize old-problematic-commit
Currently that is possible with manual use of merge-recursive but the
cherry-pick/revert porcelain does not expose the functionality.
While at it, document the existing support for --strategy.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3032-merge-recursive-options.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh index 2293797553..796f616abf 100755 --- a/t/t3032-merge-recursive-options.sh +++ b/t/t3032-merge-recursive-options.sh @@ -107,6 +107,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 |