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

Re: [PATCH] launch_editor(): allow spaces in the filename

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 10, 2008, 22:24 UTC
Message-ID
<alpine.LSU.1.00.0803102319380.4741@racer.site>
In-Reply-To
<7vabl6i72j.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 10 Mar 2008, Junio C Hamano wrote:
Show 29 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > ...
> >> This fixes
> >>
> >> 	git config core.editor "c:/Program Files/What/Ever.exe"
> >>
> >
> > Having sent a few messages about shell quoting, it makes me wonder if this
> > was done very deliberately in the first place, so that you can do things
> > like:
> >
> > 	git config core.editor "emacs -nw"
> >
> > Blame followed by list archive hunting around that timeperiod would tell.
> 
> I'll let others look for the bug report and user request from the list
> archive, but the pertinent commit is 5e2de4f9 (Fix $EDITOR regression
> introduced by rewrite in C.):
> 
>     When git-tag and git-commit launches the editor, they used to
>     honor EDITOR="editor -options args..." but recent rewrite in C
>     insisted on $EDITOR to be the path to the editor executable.
>     
>     This restores the older behaviour.
>     
> In other words, your example is a user error and your patch is a
> regression.
I was well aware of that commit when I wrote the patch, but...
Show 5 quoted lines
> I guess the right way to do that would be:
> 
> 	git config core.editor '"c:/Program Files/What/Ever.exe"'
> 
> but I do not do windows, so this is obviously untested.

Ooops. The commit message I gave did not escape the double quotes, but I _meant_ to, promise! So yes, it was my intention that

	git config core.editor \"C:/Program\ Files/vim/vim71/gvim.exe\"
works, but
	git config core.editor "C:/Program Files/vim/vim71/gvim.exe"
does not.  Note that the test was written correctly.

Sorry, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 11 in “launch_editor(): allow spaces in the filename”
  1. launch_editor(): allow spaces in the filenameJohannes Schindelin, Mar 10, 2008
  2. Johannes SixtMar 10, 2008
  3. Junio C HamanoMar 10, 2008
  4. Johannes SixtMar 10, 2008
  5. Johannes SchindelinMar 10, 2008
  6. Junio C HamanoMar 10, 2008
  7. Junio C HamanoMar 10, 2008
  8. Junio C HamanoMar 10, 2008
  9. Johannes SchindelinMar 10, 2008
  10. Junio C HamanoMar 11, 2008
  11. launch_editor(): allow spaces in the filenameJohannes Schindelin, Mar 11, 2008

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.