Browse code

Merge "Disable shallow cloning with GIT_DEPTH=0"

Jenkins authored on 2015/01/21 02:55:50
Showing 2 changed files
... ...
@@ -601,7 +601,7 @@ function git_clone {
601 601
     local git_clone_flags=""
602 602
 
603 603
     RECLONE=$(trueorfalse False RECLONE)
604
-    if [[ -n "${GIT_DEPTH}" ]]; then
604
+    if [[ "${GIT_DEPTH}" -gt 0 ]]; then
605 605
         git_clone_flags="$git_clone_flags --depth $GIT_DEPTH"
606 606
     fi
607 607
 
... ...
@@ -697,7 +697,8 @@ SYSLOG_PORT=${SYSLOG_PORT:-516}
697 697
 LOG_COLOR=$(trueorfalse True LOG_COLOR)
698 698
 
699 699
 # Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone
700
-GIT_DEPTH=${GIT_DEPTH:-1}
700
+# Set to 0 to disable shallow cloning
701
+GIT_DEPTH=${GIT_DEPTH:-0}
701 702
 
702 703
 # Use native SSL for servers in SSL_ENABLED_SERVICES
703 704
 USE_SSL=$(trueorfalse False USE_SSL)