{"thread":{"id":"25733","subject":"[PATCH v3] rebase -X: do not clobber strategy","startedAt":"2010-11-12T19:00:59Z","lastAt":"2010-11-12T19:00:59Z","messageCount":1,"participants":["Martin von Zweigbergk"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"155813","messageId":"1289588459-7064-1-git-send-email-martin.von.zweigbergk@gmail.com","threadId":"25733","inReplyTo":null,"subject":"[PATCH v3] rebase -X: do not clobber strategy","fromName":"Martin von Zweigbergk","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-11-12T19:00:59Z","receivedAt":"2010-11-12T19:00:59Z","isPatch":true,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"If any strategy options are passed to -X, the strategy will always be\nset to 'recursive'. According to the documentation, it should default to\n'recursive' if it is not set, but it should be possible to set it to\nother values.\n\nSigned-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>\n---\nChanges since v2: Now includes a test case provided by Junio.\n\n git-rebase.sh           |    4 ----\n t/t3402-rebase-merge.sh |   21 +++++++++++++++++++++\n 2 files changed, 21 insertions(+), 4 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 42c0628..ec08f9c 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -312,10 +312,6 @@ do\n \t\tesac\n \t\tstrategy_opts=\"$strategy_opts $(git rev-parse --sq-quote \"--$newopt\")\"\n \t\tdo_merge=t\n-\t\tif test -n \"$strategy\"\n-\t\tthen\n-\t\t\tstrategy=recursive\n-\t\tfi\n \t\t;;\n \t-s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\\\n \t\t--strateg=*|--strategy=*|\\\ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 2bea656..be8c1d5 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -117,4 +117,25 @@ test_expect_success 'picking rebase' '\n \tesac\n '\n \n+test_expect_success 'rebase -s funny -Xopt' '\n+\ttest_when_finished \"rm -fr test-bin funny.was.run\" &&\n+\tmkdir test-bin &&\n+\tcat >test-bin/git-merge-funny <<-EOF &&\n+\t#!$SHELL_PATH\n+\tcase \"\\$1\" in --opt) ;; *) exit 2 ;; esac\n+\tshift &&\n+\t>funny.was.run &&\n+\texec git merge-recursive \"\\$@\"\n+\tEOF\n+\tchmod +x test-bin/git-merge-funny &&\n+\tgit reset --hard &&\n+\tgit checkout -b test-funny master^ &&\n+\ttest_commit funny &&\n+\t(\n+\t\tPATH=./test-bin:$PATH\n+\t\tgit rebase -s funny -Xopt master\n+\t) &&\n+\ttest -f funny.was.run\n+'\n+\n test_done\n-- \n1.7.3.2.167.ga361b\n"}]}