Fixed working with git checkout depth
Change-Id: Id5a70a5a905d6bfe45f3737753d9854f91bfe3d1
diff --git a/src/com/mirantis/mk/Git.groovy b/src/com/mirantis/mk/Git.groovy
index 523a853..22ca53d 100644
--- a/src/com/mirantis/mk/Git.groovy
+++ b/src/com/mirantis/mk/Git.groovy
@@ -28,7 +28,7 @@
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'CheckoutOption', timeout: timeout],
- [$class: 'CloneOption', depth: depth, noTags: false, reference: '', shallow: false, timeout: timeout]],
+ [$class: 'CloneOption', depth: depth, noTags: false, reference: '', shallow: depth > 0, timeout: timeout]],
submoduleCfg: [],
userRemoteConfigs: [[url: url, credentialsId: credentialsId]]]
)