mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
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 <denniskempin@google.com> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com> Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
d12728e6d3
commit
57470a47d0
1 changed files with 1 additions and 0 deletions
1
tools/cl
1
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)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue