Skip to content
Permalink
Browse files

[JENKINS-7376] Clean submodules whenever cleaning superproject (after…

… checkout), unless submodules are disabled
  • Loading branch information...
Rafal Zwierz
Rafal Zwierz committed Oct 17, 2012
1 parent eecf244 commit abe5ceb1a045655d1df2177347babc5f4f6ff3c7
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/java/hudson/plugins/git/GitSCM.java
@@ -1234,6 +1234,10 @@ public BuildData invoke(File localWorkspace, VirtualChannel channel)
if (getClean()) {
listener.getLogger().println("Cleaning workspace");
git.clean();

if (git.hasGitModules() && !disableSubmodules) {
git.submoduleClean(recursiveSubmodules);
}
}

git.checkoutBranch(paramLocalBranch, revToBuild.getSha1().name());

0 comments on commit abe5ceb

Please sign in to comment.
You can’t perform that action at this time.