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

Re: Bug: git-p4 edit_template() and P4EDITOR w/options

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 4, 2015, 23:11 UTC
Message-ID
<20150504231136.GY5467@google.com>
In-Reply-To
<xmqqvbg8netq.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
>> Perhaps a single-liner patch like this would work?
>>
>> -	system([editor, template_file])
>> +	system(["sh", "-c", editor, template_file])
>
> Nah, scratch that.  The list should be more like
>
> 	["sh", "-c", "%s %s" % (editor, shlex.quote(template_file))]
*nod*
run-command.c does
	system(["sh", "-c", ('%s "$@"' % editor), editor, template_file])
to avoid having to figure out how to shell-quote template_file.
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 8 in “Bug: git-p4 edit_template() and P4EDITOR w/options”
  1. Chris LasellMay 4, 2015
  2. Junio C HamanoMay 4, 2015
  3. Junio C HamanoMay 4, 2015
  4. Junio C HamanoMay 4, 2015
  5. Junio C HamanoMay 4, 2015
  6. Jonathan NiederMay 4, 2015
  7. Junio C HamanoMay 5, 2015
  8. Chris LasellMay 4, 2015

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.