From: Johannes Sixt Date: Wed, 25 Feb 2009 13:04:19 GMT Subject: Re: [PATCH 2/2] git submodule: Fix adding of submodules at paths with ./ Message-ID: <49A541D3.4030001@viscovery.net> In-Reply-To: <49A53B15.4060608@drmicha.warpmail.net> 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