From: David Aguilar <davvid@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH 3/3] difftool: Use eval to expand '--extcmd' expressions
Date: Fri, 15 Jan 2010 09:59:15 -0800 [thread overview]
Message-ID: <20100115175913.GA21106@gmail.com> (raw)
In-Reply-To: <4B502A0C.50108@viscovery.net>
On Fri, Jan 15, 2010 at 09:40:44AM +0100, Johannes Sixt wrote:
> David Aguilar schrieb:
> > - $GIT_DIFFTOOL_EXTCMD "$LOCAL" "$REMOTE"
> > + (eval $GIT_DIFFTOOL_EXTCMD "\"$LOCAL\"" "\"$REMOTE\"")
>
> The new code is broken if $LOCAL or $REMOTE can contain double-quotes. How
> about this alternative:
>
> eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
>
> which I find more readable as well.
I'll resend a patch later today (can't quite right now, but will
have time later).
> What's the reason for the sub-shell? Do you want to protect from shell
> code in $GIT_DIFFTOOL_EXTCMD that modifies difftool's variables?
>
> -- Hannes
None, really, so we can do without that as well.
Thanks for your notes,
--
David
prev parent reply other threads:[~2010-01-15 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 7:16 [PATCH 1/3] t7800-difftool.sh: Simplify the --extcmd test David Aguilar
2010-01-15 7:16 ` [PATCH 2/3] difftool: Add '-x' and as an alias for '--extcmd' David Aguilar
2010-01-15 19:46 ` Junio C Hamano
2010-01-15 19:54 ` Bill Lear
2010-01-16 1:05 ` Junio C Hamano
2010-01-16 13:44 ` Bill Lear
2010-01-15 7:16 ` [PATCH 3/3] difftool: Use eval to expand '--extcmd' expressions David Aguilar
2010-01-15 8:40 ` Johannes Sixt
2010-01-15 17:59 ` David Aguilar [this message]
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=20100115175913.GA21106@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.