From 57470a47d0f93ac5e6aa70b564c4a7791e0ee5de Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 15 Jul 2022 15:31:43 -0700 Subject: [PATCH] tools/cl: don't try to prune branches with no upstream This cleans up the output a bit when there are many local branches that don't have an upstream configured. BUG=None TEST=tools/cl prune Change-Id: Ic5892dcbca315613682326c5615fce28d49b421d Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764046 Reviewed-by: Dennis Kempin Tested-by: Daniel Verkamp Commit-Queue: Dennis Kempin Auto-Submit: Daniel Verkamp --- tools/cl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/cl b/tools/cl index cf5c1a808f..532a9436fe 100755 --- a/tools/cl +++ b/tools/cl @@ -151,6 +151,7 @@ def prune(force: bool = False): branch for branch in list_local_branches() if branch != current_branch + and get_upstream(branch) is not None and all( change.status in ["ABANDONED", "MERGED"] for change in LocalChange.list_changes(branch) )