From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Zeng.Shixin@gmail.com, theevancarroll@gmail.com, git@vger.kernel.org
Subject: Re: [PATCH] launch_editor(): allow spaces in the filename
Date: Mon, 10 Mar 2008 17:15:18 -0700 [thread overview]
Message-ID: <7v1w6ii0a1.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LSU.1.00.0803102140280.3975@racer.site> (Johannes Schindelin's message of "Mon, 10 Mar 2008 21:42:47 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> For some reason, the construct
>
> sh -c "$0 \"$@\"" <editor> <file>
>
> does not pick up quotes in <editor> as expected. So replace $0 with
> <editor>.
>
> This fixes
>
> git config core.editor "c:/Program Files/What/Ever.exe"
Ah, I misread your patch. The above example needs to be fixed as
discussed, but what the patch does to builtin-tag.c is fine.
> diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
> index c1cec55..5395b74 100755
> --- a/t/t7005-editor.sh
> +++ b/t/t7005-editor.sh
> @@ -89,6 +89,34 @@ do
> '
> done
>
> +test_expect_success 'editor with a space' '
> +
> + if echo "echo space > \"\$1\"" > "e space.sh"
> + then
> + chmod a+x "e space.sh" &&
> + GIT_EDITOR="./e\ space.sh" \
> + git --exec-path=. commit --amend &&
Why do you need --exec-path=. to tell the newly built git to find its
subcommands from t/trash directory, when you give an explicit instruction
to find GIT_EDITOR in "./"?
next prev parent reply other threads:[~2008-03-11 0:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 20:42 [PATCH] launch_editor(): allow spaces in the filename Johannes Schindelin
2008-03-10 21:32 ` Johannes Sixt
2008-03-10 21:37 ` Junio C Hamano
2008-03-10 21:46 ` Johannes Sixt
2008-03-10 22:18 ` Johannes Schindelin
2008-03-10 21:33 ` Junio C Hamano
2008-03-10 21:42 ` Junio C Hamano
2008-03-10 21:48 ` Junio C Hamano
2008-03-10 22:24 ` Johannes Schindelin
2008-03-11 0:15 ` Junio C Hamano [this message]
2008-03-11 9:56 ` Johannes Schindelin
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=7v1w6ii0a1.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=Zeng.Shixin@gmail.com \
--cc=git@vger.kernel.org \
--cc=theevancarroll@gmail.com \
/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).