Re: [PATCH] Have tests and programs understand paths containing spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux