git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/2] submodule: fix handling of relative superproject origin URLs

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 24, 2012, 23:07 UTC
Message-ID
<CAH3AnrqBtzALZjk_sRDbCfHrPmnGbdstUuKWaHiaJJayfCw9=Q@mail.gmail.com>
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:
Show 16 quoted lines
>        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.
Previous: Jon Seymour
Message 7 of 7 in “series: submodule: fix handling of relative superproject origin URLs”
  1. 0/2 series: submodule: fix handling of relative superproject origin URLsJon Seymour, May 24, 2012
  2. 1/2 submodule: document failures handling relative superproject origin URLsJon Seymour, May 24, 2012
  3. 2/2 submodule: fix handling of relative superproject origin URLsJon Seymour, May 24, 2012
  4. Jon SeymourMay 24, 2012
  5. Phil HordMay 24, 2012
  6. Jon SeymourMay 24, 2012
  7. Jon SeymourMay 24, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.