Unable to pull submodules that contain ".url" in the url

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      git-client-plugin fetches the list of submodules using:

      git config -f .gitmodules --get-regexp "^submodule\\.(.*)\\.url"
      

      Which returns entries in the form:

      submodule.<name>.url <value>
      

      It then uses

      "Pattern.compile("^submodule\\.(.*)\\.url", Pattern.MULTILINE)"
      

      to extract the module name (CliGitAPIImpl.java#L1062).

      I have a thirdparty submodule called "urlesc" that lives in a repo that looks something like:

      submodule.src/git.repo.local/urlesc.url git.repo.local:/gitroot/thirdparty.urlesc.git

      If the value contains ".url" the regex will match too much of the line.

      It thinks the name is "src/git.repo.local/urlesc.url git.repo.local:/gitroot/thirdparty" and so tries to run:

      git config --get "submodule.src/git.repo.local/urlesc.url git.repo.local:/gitroot/thirdparty.url"
      

      which is incorrect.

      The regex should be something like

      "^submodule\\.(.*)\\.url "
      

      (note the space after url) or

      "^submodule\\.([^ ]*)\\.url"
      

      .

            Assignee:
            Mark Waite
            Reporter:
            Greg Franklin
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: