diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-01-04 21:31:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-05 20:26:01 (GMT) |
commit | dd6fb0053ce5b6923505e64993d8061484665962 (patch) | |
tree | d865b635907a0a4227b4beb9e2a47bdaca05d763 /git-rebase--interactive.sh | |
parent | 3013dff8662eae06457fe6e5348dfe2270810ab2 (diff) | |
download | git-dd6fb0053ce5b6923505e64993d8061484665962.zip git-dd6fb0053ce5b6923505e64993d8061484665962.tar.gz git-dd6fb0053ce5b6923505e64993d8061484665962.tar.bz2 |
rebase -p: fix quoting when calling `git merge`
It has been reported that strategy arguments are not passed to `git
merge` correctly when rebasing interactively, preserving merges.
The reason is that the strategy arguments are already quoted, and then
quoted again.
This fixes https://github.com/git-for-windows/git/issues/1321
Original-patch-by: Kim Gybels <kgybels@infogroep.be>
Also-reported-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r-- | git-rebase--interactive.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 4378156..e9692df 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -392,9 +392,12 @@ pick_one_preserving_merges () { new_parents=${new_parents# $first_parent} merge_args="--no-log --no-ff" if ! do_with_author output eval \ - 'git merge ${gpg_sign_opt:+"$gpg_sign_opt"} \ - $allow_rerere_autoupdate $merge_args \ - $strategy_args -m "$msg_content" $new_parents' + git merge ${gpg_sign_opt:+$(git rev-parse \ + --sq-quote "$gpg_sign_opt")} \ + $allow_rerere_autoupdate "$merge_args" \ + "$strategy_args" \ + -m $(git rev-parse --sq-quote "$msg_content") \ + "$new_parents" then printf "%s\n" "$msg_content" > "$GIT_DIR"/MERGE_MSG die_with_patch $sha1 "$(eval_gettext "Error redoing merge \$sha1")" |