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

Submodule update fails when the submodule isn't clean

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins doesn't forcibly update submodules. This means that a checkout can fail with:

      hudson.plugins.git.GitException: Command "git submodule update --init --recursive modules/gmock" returned status code 1:
      stdout: 
      stderr: error: Your local changes to the following files would be overwritten by checkout:
      build-aux/config.guess
      build-aux/config.sub
      gtest/build-aux/config.guess
      gtest/build-aux/config.sub
      Please, commit your changes or stash them before you can switch branches.
      Aborting
      Unable to checkout 'ec44c6c1675c25b9827aacd08c02433cccde7780' in submodule path 'modules/gmock'
      

      Note, while JENKINS-22510 is relevant, and cleaning the checkout before checking out would resolve the problem, that's not a viable solution. Cleaning the checkout throws away all built files, which means the build is no longer incremental.

      Note, this means the behaviour for submodules doesn't match it's behaviour for the standard checkout (which is checked out with --force).

        Attachments

          Activity

          Hide
          richardwhiuk Richard Whitehouse added a comment -
          Show
          richardwhiuk Richard Whitehouse added a comment - https://github.com/jenkinsci/git-client-plugin/pull/404  has a fix for this issue.

            People

            • Assignee:
              richardwhiuk Richard Whitehouse
              Reporter:
              richardwhiuk Richard Whitehouse
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: