Re: [PATCH 2/2] git submodule: Fix adding of submodules at paths with ./
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Feb 25, 2009, 11:21 UTC
- Message-ID
- <49A529AB.8010700@viscovery.net>
- In-Reply-To
- <1235559820-3096-3-git-send-email-git@drmicha.warpmail.net>
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