From 33f27d3477be9f00719220e0c1a53bc4ef05d931 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 8 Jul 2022 12:19:04 -0700 Subject: [PATCH] xtensa-build-zephyr.py: speed up thanks to an _actually_ shallow clone This will significantly speed up CI in some cases. Fixes commit ffdf001eeeba ("xtensa-build-zephyr.py: clone zephyr with --depth 5") When I added --depth 5 to git clone in that commit I naively assumed git fetch would "inherit" that. I think it does but only when fetching an _existing_ (and shallow) branch, not when fetching something new. Signed-off-by: Marc Herbert --- scripts/xtensa-build-zephyr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index ee7eaace1..aa62b2c14 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -380,7 +380,7 @@ def west_init_update(): # unknown submitters on any CI system. execute_command(["git", "clone", "--depth", "5", args.url, str(zephyr_dir)], timeout=1200) - execute_command(["git", "fetch", z_remote, z_ref], timeout=300, cwd=zephyr_dir) + execute_command(["git", "fetch", "--depth", "5", z_remote, z_ref], timeout=300, cwd=zephyr_dir) execute_command(["git", "checkout", "FETCH_HEAD"], cwd=zephyr_dir) execute_command(["git", "-C", str(zephyr_dir), "--no-pager", "log", "--oneline", "--graph", "--decorate", "--max-count=20"])