submodule: fix quoting in relative_path()
commitf5a8fc567b8309c630644d1d41fd8b4b41cae015
authorJohn Keeping <john@keeping.me.uk>
Wed, 24 Apr 2013 08:15:36 +0000 (24 09:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Apr 2013 19:25:37 +0000 (24 12:25 -0700)
treedb8c89c224ac50abc8d467c10d2efc2a30680e0a
parentcaca2c1b9c6d0e724eec7b601a08a50c0bdee837
submodule: fix quoting in relative_path()

Commit caca2c1 (submodule: drop the top-level requirement) introduced a
relative_path helper but does not quote $curdir when it is stripped from
the front of a target path.  In this particular case this should be safe
even with special characters because we only do this after checking that
$target begins with "$curdir/" which is quoted correctly, but we should
quote the variable to be certain that there is not some obscure case
where we this could strip more or less than we want.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh