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

From: Johannes Sixt <[email-masked]>
Date: Wed, 25 Feb 2009 14:04:19 +0100

Michael J Gruber schrieb:
> Johannes Sixt venit, vidit, dixit 25.02.2009 12:21:
>> 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?
> 
> Wrong.

Ouch! Point taken. I didn't notice the ^ in the first expression, and I
even copy-pasted and edited it!

> Now, the /// are in fact a valid concern[1], although probably not that
> common an isue.

I'm fine if only common use cases are taken care of. If you say that ./ is
common and /// is not, then I'll believe it because I'm not a git
submodule user (yet) and can't argue about this with my own experience.

-- Hannes