git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Jens.Lehmann@web.de,
	Jon Seymour <jon.seymour@gmail.com>
Subject: Re: [PATCH v5 2/2] submodule: fix handling of relative superproject origin URLs
Date: Fri, 25 May 2012 09:07:11 +1000	[thread overview]
Message-ID: <CAH3AnrqBtzALZjk_sRDbCfHrPmnGbdstUuKWaHiaJJayfCw9=Q@mail.gmail.com> (raw)
In-Reply-To: <1337830657-16400-3-git-send-email-jon.seymour@gmail.com>

On Thu, May 24, 2012 at 1:37 PM, Jon Seymour <jon.seymour@gmail.com> 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.

      parent reply	other threads:[~2012-05-24 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  3:37 [PATCH v5 0/2] series: submodule: fix handling of relative superproject origin URLs Jon Seymour
2012-05-24  3:37 ` [PATCH v5 1/2] submodule: document failures handling " Jon Seymour
2012-05-24  3:37 ` [PATCH v5 2/2] submodule: fix handling of " Jon Seymour
2012-05-24  3:40   ` Jon Seymour
2012-05-24 18:58   ` Phil Hord
2012-05-24 22:09     ` Jon Seymour
2012-05-24 23:07   ` Jon Seymour [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH3AnrqBtzALZjk_sRDbCfHrPmnGbdstUuKWaHiaJJayfCw9=Q@mail.gmail.com' \
    --to=jon.seymour@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).