From: Gustaf Hendeby <hendeby@isy.liu.se>
To: Jeff King <peff@peff.net>
Cc: luciano@eurotux.com, git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH v2] Make git send-email accept $EDITOR with arguments
Date: Fri, 21 Dec 2007 22:07:58 +0100 [thread overview]
Message-ID: <476C2B2E.1080801@isy.liu.se> (raw)
In-Reply-To: <20071221192359.GA10660@coredump.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]
On 2007-12-21 20:23, Jeff King wrote:
> On Fri, Dec 21, 2007 at 04:23:11PM +0100, Gustaf Hendeby wrote:
>
>>> If you are going to do it that way, I suspect you want to quotemeta
>>> $compose_filename.
>> Generally that would be true, but is that really necessary when I know
>> $compose_filename is defined as:
>>
>> my $compose_filename = ".msg.$$";
>
> I know; it is just easier to see that it is correct with the quotemeta
> (and correct in the face of somebody changing the message later).
Point taken!
>
>> Or, should I take it that you prefer the version using split? I didn't
>> really feel good about the possibility of splitting paths with spaces
>> that came with that one though.
>
> I am fine with using the shell. Though keep in mind that the two
> solutions will behave differently with
>
> EDITOR='foo; bar'
>
> That is, system("$editor $message") will actually invoke the shell,
> whereas system(split(/ /, $editor), $message) will _just_ split on
> whitespace. We should do whatever is consistent with the rest of the git
> commands (off the top of my head, I don't know).
A quick look at the proposed solution to the similar problem with git
commit, using code now in git tag, it seems it uses a split like
solution, though taking " and ' quoting into consideration. On the top
of my head I can't come up with any other commands using $EDITOR. I'll
try to find some time the next couple of days to make a reasonable
equivalent solution here.
Thanks,
Gustaf
[-- Attachment #2: hendeby.vcf --]
[-- Type: text/x-vcard, Size: 378 bytes --]
begin:vcard
fn:Gustaf Hendeby
n:Hendeby;Gustaf
org;quoted-printable:Link=C3=B6ping University;Department of Electrical Engineering
adr;quoted-printable:;;;Link=C3=B6ping;;SE-581 83;Sweden
email;internet:hendeby@isy.liu.se
title:PhD Student
tel;work:+46 (0)13 282226
tel;fax:+46 (0)13 282622
x-mozilla-html:FALSE
url:http://www.control.isy.liu.se/~hendeby
version:2.1
end:vcard
next prev parent reply other threads:[~2007-12-21 21:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 20:14 [PATCH] Make git send-email accept $EDITOR with arguments Gustaf Hendeby
2007-12-20 20:32 ` Luciano Rocha
2007-12-21 11:36 ` [PATCH v2] " Gustaf Hendeby
2007-12-21 13:34 ` Jeff King
2007-12-21 15:23 ` Gustaf Hendeby
2007-12-21 19:23 ` Jeff King
2007-12-21 21:07 ` Gustaf Hendeby [this message]
2007-12-21 21:17 ` Junio C Hamano
2007-12-22 0:40 ` [PATCH v3] " Gustaf Hendeby
2007-12-22 1:05 ` Junio C Hamano
2007-12-22 8:47 ` Gustaf Hendeby
2007-12-21 17:02 ` [PATCH v2] " Junio C Hamano
2007-12-22 0:43 ` [PATCH] Move git send-email cover letter temporary file to $GIT_DIR Gustaf Hendeby
2007-12-22 1:09 ` Junio C Hamano
2007-12-22 1:18 ` David Symonds
2007-12-22 6:49 ` Junio C Hamano
2007-12-22 7:04 ` David Symonds
2007-12-22 8:52 ` Junio C Hamano
2007-12-22 9:13 ` Gustaf Hendeby
-- strict thread matches above, loose matches on Subject: below --
2007-12-21 21:37 [PATCH v2] Make git send-email accept $EDITOR with arguments Gustaf Hendeby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=476C2B2E.1080801@isy.liu.se \
--to=hendeby@isy.liu.se \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=luciano@eurotux.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).