From 5e3892fbd12de38f83dd3407040cadb29c57f336 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 5 Dec 2013 10:17:09 -0800 Subject: [PATCH] Have gerrit-git-prep clone from /opt/git if it exists Change-Id: Ifd47e1610b9f3720fdde1e9f88ea7e4aaeb485c7 --- modules/jenkins/files/slave_scripts/gerrit-git-prep.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/jenkins/files/slave_scripts/gerrit-git-prep.sh b/modules/jenkins/files/slave_scripts/gerrit-git-prep.sh index 098396a09c..6e0109dc2d 100755 --- a/modules/jenkins/files/slave_scripts/gerrit-git-prep.sh +++ b/modules/jenkins/files/slave_scripts/gerrit-git-prep.sh @@ -39,7 +39,12 @@ if [[ ! -e .git ]] then ls -a rm -fr .[^.]* * - git clone $GIT_ORIGIN/$ZUUL_PROJECT . + if [ -d /opt/git/$ZUUL_PROJECT/.git ] + then + git clone file:///opt/git/$ZUUL_PROJECT . + else + git clone $GIT_ORIGIN/$ZUUL_PROJECT . + fi fi git remote set-url origin $GIT_ORIGIN/$ZUUL_PROJECT