Merge branch 'fr/rebase-i-continue-preserve-options'
"git rebase -i" started with merge strategy options did not propagate them upon "git rebase --continue". * fr/rebase-i-continue-preserve-options: rebase -i: remember merge options beyond continue actions
This commit is contained in:
commit
f3adf457e0
@ -81,17 +81,13 @@ rewritten_pending="$state_dir"/rewritten-pending
|
|||||||
# and leaves CR at the end instead.
|
# and leaves CR at the end instead.
|
||||||
cr=$(printf "\015")
|
cr=$(printf "\015")
|
||||||
|
|
||||||
strategy_args=
|
strategy_args=${strategy:+--strategy=$strategy}
|
||||||
if test -n "$do_merge"
|
eval '
|
||||||
then
|
for strategy_opt in '"$strategy_opts"'
|
||||||
strategy_args=${strategy:+--strategy=$strategy}
|
do
|
||||||
eval '
|
strategy_args="$strategy_args -X$(git rev-parse --sq-quote "${strategy_opt#--}")"
|
||||||
for strategy_opt in '"$strategy_opts"'
|
done
|
||||||
do
|
'
|
||||||
strategy_args="$strategy_args -X$(git rev-parse --sq-quote "${strategy_opt#--}")"
|
|
||||||
done
|
|
||||||
'
|
|
||||||
fi
|
|
||||||
|
|
||||||
GIT_CHERRY_PICK_HELP="$resolvemsg"
|
GIT_CHERRY_PICK_HELP="$resolvemsg"
|
||||||
export GIT_CHERRY_PICK_HELP
|
export GIT_CHERRY_PICK_HELP
|
||||||
|
@ -1006,6 +1006,22 @@ test_expect_success 'rebase -i with --strategy and -X' '
|
|||||||
test $(cat file1) = Z
|
test $(cat file1) = Z
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'interrupted rebase -i with --strategy and -X' '
|
||||||
|
git checkout -b conflict-merge-use-theirs-interrupted conflict-branch &&
|
||||||
|
git reset --hard HEAD^ &&
|
||||||
|
>breakpoint &&
|
||||||
|
git add breakpoint &&
|
||||||
|
git commit -m "breakpoint for interactive mode" &&
|
||||||
|
echo five >conflict &&
|
||||||
|
echo Z >file1 &&
|
||||||
|
git commit -a -m "one file conflict" &&
|
||||||
|
set_fake_editor &&
|
||||||
|
FAKE_LINES="edit 1 2" git rebase -i --strategy=recursive -Xours conflict-branch &&
|
||||||
|
git rebase --continue &&
|
||||||
|
test $(git show conflict-branch:conflict) = $(cat conflict) &&
|
||||||
|
test $(cat file1) = Z
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'rebase -i error on commits with \ in message' '
|
test_expect_success 'rebase -i error on commits with \ in message' '
|
||||||
current_head=$(git rev-parse HEAD) &&
|
current_head=$(git rev-parse HEAD) &&
|
||||||
test_when_finished "git rebase --abort; git reset --hard $current_head; rm -f error" &&
|
test_when_finished "git rebase --abort; git reset --hard $current_head; rm -f error" &&
|
||||||
|
Loading…
Reference in New Issue
Block a user