Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75860

Updating submodules not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-client-plugin

      When recursively updating git submodules an exception is thrown (see attached log file). The submodule "BuildConfig" exists and is correctly configured in my .gitmodules file.

      The command that extracts all submodules works:

      > git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10

       

      But the url can not be fetched:

      > git config --get submodule.BuildScripts.url # timeout=10
      hudson.plugins.git.GitException: Command "git config --get submodule.BuildScripts.url" returned status code 1:
      ....

       

      Problem is the missing file reference to .gitmodules like it exists in the first command:

      -f .gitmodules 

       

      Edit: I found that the above behavior comes from the '.git/config' and '.gitmodules' files being inconsistent.
      I propose that for consistency reasons either '-f .gitmodules' gets removed from

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

      or

      git config --get submodule.XXX.url

      is changed to 

      git config -f .gitmodules --get submodule.XXX.url

       

      As Git does favor the latter formatting I prefer using '.gitmodules' over '.git/config' for submodules.

            monthycurious Florian
            monthycurious Florian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: