Merge "Disable shallow cloning with GIT_DEPTH=0"

This commit is contained in:
Jenkins 2015-01-20 17:55:50 +00:00 committed by Gerrit Code Review
commit 4f154070e4
2 changed files with 3 additions and 2 deletions

View File

@ -601,7 +601,7 @@ function git_clone {
local git_clone_flags="" local git_clone_flags=""
RECLONE=$(trueorfalse False RECLONE) RECLONE=$(trueorfalse False RECLONE)
if [[ -n "${GIT_DEPTH}" ]]; then if [[ "${GIT_DEPTH}" -gt 0 ]]; then
git_clone_flags="$git_clone_flags --depth $GIT_DEPTH" git_clone_flags="$git_clone_flags --depth $GIT_DEPTH"
fi fi

View File

@ -697,7 +697,8 @@ SYSLOG_PORT=${SYSLOG_PORT:-516}
LOG_COLOR=$(trueorfalse True LOG_COLOR) LOG_COLOR=$(trueorfalse True LOG_COLOR)
# Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone # Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone
GIT_DEPTH=${GIT_DEPTH:-1} # Set to 0 to disable shallow cloning
GIT_DEPTH=${GIT_DEPTH:-0}
# Use native SSL for servers in SSL_ENABLED_SERVICES # Use native SSL for servers in SSL_ENABLED_SERVICES
USE_SSL=$(trueorfalse False USE_SSL) USE_SSL=$(trueorfalse False USE_SSL)