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

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 5, 2018, 21:14 UTC
Message-ID
<nycvar.QRO.7.76.6.1801052212000.1337@wbunaarf-fpuvaqryva.tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqvaggaw11.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Fri, 5 Jan 2018, Junio C Hamano wrote:
Show 26 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> 
> >  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.

Don't be so harsh on yourself. This bug was apparently not a big deal for four years (which can feel like a *very* long time, can't it?).

Besides, the way code review happens in this project is not really conducive to intense testing of the code: mere patch review will never be as effective as patch review combined with hands-on testing of code paths that may look like they could hide some unexpected bugs.

Ciao, Dscho

Previous: Junio C Hamano
Message 3 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.