git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Arjen Laarhoven <arjen@yaph.org>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Have tests and programs understand paths containing spaces
Date: Wed, 23 Apr 2008 09:13:04 +0200	[thread overview]
Message-ID: <480EE180.1050202@viscovery.net> (raw)
In-Reply-To: <20080422212801.GB20417@regex.yaph.org>

Arjen Laarhoven schrieb:
> A lot of tests and some core programs didn't work when used in a path
> containing whitespace.  Correct the quoting of all affected programs to
> fix this.

Please separate fixes of core programs/scripts from fixes of the tests
(because the former have a much higher chance of being accepted).

But see these threads first:

http://thread.gmane.org/gmane.comp.version-control.git/60544
http://thread.gmane.org/gmane.comp.version-control.git/79057


Here a few comments:

> +GIT_DIR="$PWD/.git"
> +GIT_SVN_DIR="$GIT_DIR/svn/git-svn"
> +SVN_TREE="$GIT_SVN_DIR/svn-tree"
> +svnrepo="$PWD/svnrepo"

These are unnecessary: RHS of an assignment does not undergo word splitting.

> -test_expect_success "checkout from svn" "svn co $svnrepo '$SVN_TREE'"
> +test_expect_success "checkout from svn" "svn co '$svnrepo' '$SVN_TREE'"

> -	git diff help $SVN_TREE/exec-2.sh"
> +	git diff help '$SVN_TREE'/exec-2.sh"

These changes protect *only* against space-in-name, but not
random-special-character-in-name. The proper fix is to change the quoting from

  test_expect_success "..." "... $svnrepo ..."

to

  test_expect_success '...' '... "$svnrepo" ...'

-- Hannes

      parent reply	other threads:[~2008-04-23  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 21:28 [PATCH] Have tests and programs understand paths containing spaces Arjen Laarhoven
2008-04-22 23:07 ` Dmitry Potapov
2008-04-23  7:13 ` Johannes Sixt [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=480EE180.1050202@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=arjen@yaph.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).