From ef79b1108294cad62d90d02a598c18b64f1632db Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 4 Aug 2025 09:18:04 +0100 Subject: tree.sh: don't delete builds if tree==target in that case, the previous tree-wide check will cover it, so the current logic wastes computational time. this patch therefore somewhat optimises the code. Signed-off-by: Leah Rowe --- include/tree.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/tree.sh') diff --git a/include/tree.sh b/include/tree.sh index f534a8fb..ed361623 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -184,9 +184,9 @@ check_project_hashes() # check only the given target; delete only the target build # if that's all that changed (not applicable to single-tree) - singletree "$project" || [ -z "$target" ] || \ - check_hashes tghash "$target" badtghash "$configdir/$target" || \ - x_ rm -Rf "elf/$project/$tree/$target"; : + singletree "$project" || [ -z "$target" ] || [ "$target" = "$tree" ] \ + || check_hashes tghash "$target" badtghash "$configdir/$target" \ + || x_ rm -Rf "elf/$project/$tree/$target"; : } check_hashes() -- cgit v1.2.1