Re: [PATCH] submodule: fix quoting in relative_path()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 24, 2013, 16:21 UTC
- Message-ID
- <7vehdzgar1.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130424081536.GT2278@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 25 quoted lines
>> > Why not just replace the six-liner by this one-liner:
>> >
>> > target=${target#"$curdir"/}
>>
>> Simple enough ;-)
>
> This seems to have arrived on next without this fix, so here's a patch
> on top.
>
> git-submodule.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-submodule.sh b/git-submodule.sh
> index 0eee703..db9f260 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -127,7 +127,7 @@ relative_path ()
> do
> case "$target" in
> "$curdir/"*)
> - target=${target#$curdir/}
> + target=${target#"$curdir"/}
> break
> ;;
> esacJ6t meant a patch to remove the entire case...esac and replace it with a single liner (target=${target#"$curdir"/}).