Updating branch-clean to handle cases where file and branch names collide
Change-Id: I902dd0685997ab35691d1c88ef78327224eb0541
diff --git a/tools/dev/bin/branch-clean b/tools/dev/bin/branch-clean
index 3de7cb7..17960b0 100755
--- a/tools/dev/bin/branch-clean
+++ b/tools/dev/bin/branch-clean
@@ -13,7 +13,7 @@
not b.strip().startswith('onos') and not b.strip().startswith('remotes') and b.strip() != 'master']
to_delete = []
for branch in branches:
- raw_local_change_ids = check_output('git show %s | grep -i change-id | awk {\' print $2 \'}' % branch, shell=True)
+ raw_local_change_ids = check_output('git show %s -- | grep -i change-id | awk {\' print $2 \'}' % branch, shell=True)
local_change_ids = [ b.strip() for b in raw_local_change_ids.split('\n') if b.strip() ]
for local_change_id in local_change_ids:
if local_change_id in changeIds and branch not in to_delete: