git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Jonathan del Strother <jon.delStrother@bestbefore.tv>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Fixing path quoting issues
Date: Thu, 11 Oct 2007 08:47:13 +0200	[thread overview]
Message-ID: <854pgytafi.fsf@lola.goethe.zz> (raw)
In-Reply-To: <470DC05A.8020209@viscovery.net> (Johannes Sixt's message of "Thu\, 11 Oct 2007 08\:19\:06 +0200")

Johannes Sixt <j.sixt@viscovery.net> writes:

> Jonathan del Strother schrieb:
>> +	cmt=`cat "$dotest/current"`
>
> This is ok, but...
>
>> +			prev_head="`cat \"$dotest/prev_head\"`"
>
> ... there are shells out there in the wild that will get badly
> confused by this sort of quoting and escaping. Butter use
>
> 	prev_head=$(cat "$dotest/prev_head")
>
>
>> -VISUAL="$(pwd)/fake-editor.sh"
>> +VISUAL="'$(pwd)/fake-editor.sh'"
>
> Huh? This looks very wrong.

It is correct, modulo breaking when there are single quotes in the
current path name.

> What are the extra quotes needed for?

Spaces in the current path name.

> If they are really needed, isn't this a bug in
> git-rebase--interactive.sh?

No.

> I question the usefulness of this patch. Why only fix breakage due
> to spaces in the path? What about single-quotes, double-quotes?

Double quotes would work.  Single quotes wouldn't.  You can do
something like

visualpath="$(pwd)"
export visualpath
VISUAL='"$visualpath/fake-editor.sh"'

and this should work in all circumstances where VISUAL is interpreted
as intended (which at the current point of time does not include git's
C callers).

> IMHO, it's not too much of a burden for developers to require "sane"
> build directory paths.

For a normal user, the only writable directories might be of the
"C:\Programs and Data\User settings\Karl"
variety.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2007-10-11  6:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 21:13 [PATCH] Fixing path quoting issues Jonathan del Strother
2007-10-11  6:19 ` Johannes Sixt
2007-10-11  6:47   ` David Kastrup [this message]
2007-10-11  7:10     ` Johannes Sixt
2007-10-11  7:30       ` Jonathan del Strother
2007-10-11  7:41         ` Johannes Sixt
2007-10-11 20:53           ` David Kastrup
2007-10-11 21:22             ` Jonathan del Strother
2007-10-11 21:31               ` Johannes Schindelin
2007-10-11 21:40                 ` David Kastrup
2007-10-12  6:43               ` Johannes Sixt
2007-10-12 11:17             ` Wincent Colaiuta
2007-10-12 11:37               ` Johannes Schindelin
2007-10-12 12:20                 ` Wincent Colaiuta
2007-10-12 12:51                   ` Johannes Schindelin
2007-10-12 13:14                     ` David Kastrup
2007-10-13 18:12   ` Jonathan del Strother
2007-10-13 22:36     ` Andreas Ericsson
2007-10-15 13:13       ` Jonathan del Strother
2007-10-15 13:13       ` [PATCH 1/3] Fixing path quoting in git-rebase Jonathan del Strother
2007-10-15 13:39         ` Johannes Sixt
2007-10-17  9:14           ` Jonathan del Strother
2007-10-17  9:31             ` [PATCH] Quoting paths, take 3 Jonathan del Strother
2007-10-17  9:31               ` [PATCH 1/2] Fixing path quoting in git-rebase Jonathan del Strother
2007-10-17  9:31                 ` [PATCH 2/2] Quoting paths in tests Jonathan del Strother
2007-10-17 11:32                   ` Johannes Sixt
2007-10-17 17:07                     ` Jonathan del Strother
2007-10-17 17:15                       ` David Kastrup
2007-10-17 20:03                         ` David Kastrup
2007-10-18  6:08                       ` Johannes Sixt
2007-10-24 13:07                         ` Jonathan del Strother
2007-10-17 10:41                 ` [PATCH 1/2] Fixing path quoting in git-rebase Johannes Sixt
2007-10-15 13:13       ` [PATCH 2/3] Quoting paths in tests Jonathan del Strother
2007-10-15 13:47         ` Johannes Sixt
2007-10-15 14:00           ` Jonathan del Strother
2007-10-15 14:17             ` Johannes Sixt
2007-10-15 14:03           ` David Kastrup
2007-10-15 13:13       ` [PATCH 3/3] Fix apostrophe quoting " Jonathan del Strother
  -- strict thread matches above, loose matches on Subject: below --
2007-10-10 21:22 [PATCH] Fixing path quoting issues maillist

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=854pgytafi.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=jon.delStrother@bestbefore.tv \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).