Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36954 )
Change subject: util/release: Try reusing the local checkout for cloning ......................................................................
util/release: Try reusing the local checkout for cloning
git clone allows using a local repo as reference which reduces the required network traffic.
Change-Id: I64722cd5dbdfc0c2bcd935715cffdb99b773711c Signed-off-by: Patrick Georgi pgeorgi@google.com --- M util/release/build-release 1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/36954/1
diff --git a/util/release/build-release b/util/release/build-release index fd3f63c..464388b 100755 --- a/util/release/build-release +++ b/util/release/build-release @@ -39,10 +39,15 @@ fi
if [ ! -d "coreboot-${VERSION_NAME}" ]; then + if [ -d .git ]; then + GIT_REF_OPTS="--reference . --dissociate" + elif [ -d ../../.git ]; then + GIT_REF_OPTS="--reference ../.. --dissociate" + fi if [ -n "${USERNAME}" ]; then - git clone "ssh://${USERNAME}@review.coreboot.org:29418/coreboot.git" "coreboot-${VERSION_NAME}" + git clone ${GIT_REF_OPTS} "ssh://${USERNAME}@review.coreboot.org:29418/coreboot.git" "coreboot-${VERSION_NAME}" else - git clone https://review.coreboot.org/coreboot.git "coreboot-${VERSION_NAME}" + git clone ${GIT_REF_OPTS} https://review.coreboot.org/coreboot.git "coreboot-${VERSION_NAME}" fi fi