From: Jon Seymour Date: Thu, 24 May 2012 23:07:11 GMT Subject: Re: [PATCH v5 2/2] submodule: fix handling of relative superproject origin URLs Message-ID: In-Reply-To: <1337830657-16400-3-git-send-email-jon.seymour@gmail.com> On Thu, May 24, 2012 at 1:37 PM, Jon Seymour wrote: >        sep=/ >        while test -n "$url" > @@ -45,6 +67,16 @@ resolve_relative_url () >                ../*) >                        url="${url#../}" >                        case "$remoteurl" in > +                       .*/*) > +                               # remove last part > +                               remoteurl="${remoteurl%/*}" > +                               # remove redundant leading ./ > +                               remoteurl="${remoteurl#./}" > +                               # prefix path from submodule work tree to superproject work tree > +                               remoteurl="${up_path}${remoteurl}" > +                               # remove trailing /. > +                               remoteurl="${remoteurl%/.}" > +                               ;; Mmmm. Probably shouldn't be doing these _all_ of these edits on each iteration of the while loop, methinks. I'll write a test, and fix. jon.