Merge branch 'ps/submodule-sanitize-path-upon-add' into maint
[git/git.git] / git-submodule.sh
index 9245abf..36797c3 100755 (executable)
@@ -423,7 +423,7 @@ cmd_add()
                sed -e '
                        s|//*|/|g
                        s|^\(\./\)*||
-                       s|/\./|/|g
+                       s|/\(\./\)*|/|g
                        :start
                        s|\([^/]*\)/\.\./||
                        tstart