Subject: Re: [PATCH 2/2] git submodule: Fix adding of submodules at paths with ./

From: Johannes Sixt <[email-masked]>
Date: Wed, 25 Feb 2009 12:21:15 +0100

Michael J Gruber schrieb:
> +	# strip superfluous ./ from path
> +	path=$(echo "$path" | sed -e 's|^\(\./\)*||' -e's|/\./|/|g')

At a minimum:

	path=$(echo "$path" | sed -e 's|^/\(\./\)*|/|g' -e's|^\./||')

Otherwise you would turn "foo./bar" into "foobar", right?

But why only care about ./ but not ../ or /// or trailing / as well?

-- Hannes