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

Git plugin using local config to update submodules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Blocker Blocker
    • git-plugin
    • None
    • Jenkins v2.6, Git plugin version 3.0.0, git-client 2.2.1

      In order to get all of the submodules, the git plugin looks in the local configuration file:

       > git config --get-regexp ^submodule # timeout=10
       > git config --get submodule.externals/jzmq.url # timeout=10
       > git submodule update --remote externals/jzmq
       > git config --get submodule.protobuf-java-format.url # timeout=10
       > git submodule update --remote protobuf-java-format
      FATAL: Command "git submodule update --remote protobuf-java-format" returned status code 1:
      stdout: 
      stderr: error: pathspec 'protobuf-java-format' did not match any file(s) known to git.
      

      However, the .git/config file is local per repository, and old entries and sections do not get overriden. Therefore, when a submodule is no longer in use or has moved, the old configuration can cause an error. Anyway, the local configuration is not part of the remote repository, which is the correct clean repo which is the exclusive authority on git configs.

      A possible solution would be to call deninit in order to remove the old configuration.

      git submodule deinit
      

            Unassigned Unassigned
            bdanilovich Boris Danilovich
            Votes:
            16 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: