Re: [PATCH 2/2] git submodule: Fix adding of submodules at paths with ./
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Feb 25, 2009, 13:04 UTC
- Message-ID
- <49A541D3.4030001@viscovery.net>
- In-Reply-To
- <49A53B15.4060608@drmicha.warpmail.net>
Michael J Gruber schrieb:
Show 11 quoted lines
> 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