git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase -p: fix quoting when calling `git merge`

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2018, 20:30 UTC
Message-ID
<xmqqvaggaw11.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<8cafe900ce97d885c58f4a7f02e748d2ae3b02a2.1515101305.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 21 quoted lines
>  git-rebase--interactive.sh |  9 ++++++---
>  t/t3418-rebase-continue.sh | 14 ++++++++++++++
>  2 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index e3f5a0abf3c..085aa068cbb 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"

Makes sense. I should have been more careful when reviewing db2b3b820e2.

Thanks.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 3 in “rebase -p: fix quoting when calling `git merge`”
  1. rebase -p: fix quoting when calling `git merge`Johannes Schindelin, Jan 4, 2018
  2. Junio C HamanoJan 5, 2018
  3. Johannes SchindelinJan 5, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.