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

Re: [PATCH] Do not ignore merge options in interactive rebase

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 24, 2013, 14:16 UTC
Message-ID
<7vd2rbd26e.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87bo6wyn0z.fsf@duckcorp.org>
Arnaud Fontaine <arnau@debian.org> writes:
Show 6 quoted lines
>>> +			$(echo $strategy_opts | sed "s/'--\([^']*\)'/-X\1/g") \
>>
>> Is it guaranteed $startegy_opts do not have a space in it?
>
> strategy_opts may be something like (git-rebase.sh): "'--foo' '--bar'",
> but I'm not sure what is wrong if there is a space in it though.

I was primarily worried about "'--frotz=nitfol xyzzy'", where you need to pass -X='frotz=nitfol xyzzy' so that 'xyzzy' part does not become a separate argument directly given to 'git merge' and friends.

And adding '' around \1 is not sufficient, because the value given to the "--frotz" may have to be "nitfol 'n xyzzy".

A comment next to that sed script that says "Currently there is no
strategy option that needs quoting" (if it is the case; I didn't
check), together with a guard to protect us against unexpected
strategy-opts, might be a workable band-aid, though.
	
Previous: Arnaud Fontaine
Message 9 of 9 in “Do not ignore merge options in interactive rebase”
  1. Do not ignore merge options in interactive rebaseArnaud Fontaine, Jun 21, 2013
  2. Junio C HamanoJun 21, 2013
  3. Arnaud FontaineJun 24, 2013
  4. Do not ignore merge options in interactive rebaseArnaud Fontaine, Jun 24, 2013
  5. Junio C HamanoJun 25, 2013
  6. Junio C HamanoJun 25, 2013
  7. Arnaud FontaineJul 2, 2013
  8. Do not ignore merge options in interactive rebaseArnaud Fontaine, Jul 2, 2013
  9. Junio C HamanoJun 24, 2013

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.