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

Git client plugin does not respect changes at .gitmodules list ( e.g. removing git sub modules )

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-client-plugin
    • None

      I successfully created a jenkins task with Git SCM checking out a git repository with some git sub modules include. (I use git client plugin V 2.0.0, with advanced submodules behaviors - "Recursively update submodules" - checked and "Update tracking submodules to tip of branch" - checked ). Job gets build successfully. Later on I removed some sub modules from the list, for example:

      git submodule deinit some-project
      git rm some-project
      git commit -a -m "remove this module"
      git push
      

      However when I run new build I get and error from the plugin:

      hudson.plugins.git.GitException: Command "/usr/bin/git submodule update --init --recursive --remote some-project" returned status code 1:
      stdout: 
      stderr: error: pathspec 'some-project' did not match any file(s) known to git.
      

      I assume that git plugin should respect changes at superproject git repository , like removing some sub modules from there. But it seems it does not. Or I miss something. As far as taking a console git client it succeed on cases when sub modules gets removed:

      git submodule init
      git submodule sync
      git submodule update --remote --init --merge --recursive 
      

            Unassigned Unassigned
            melezhik Alexey Melezhik
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: