only push if we deleted something
This commit is contained in:
parent
e6437d35f0
commit
d48ff97d0d
1 changed files with 2 additions and 2 deletions
|
@ -46,8 +46,8 @@ def delete_old_branches(repo_path: str, max_age: datetime.datetime, branch_patte
|
||||||
del_count += 1
|
del_count += 1
|
||||||
|
|
||||||
print('Deleted {} references.'.format(del_count))
|
print('Deleted {} references.'.format(del_count))
|
||||||
if not dry_run:
|
if not dry_run and del_count > 0:
|
||||||
print('Pushing to remote...')
|
print('Pushing deleted branches to remote...')
|
||||||
repo.remotes[remote_name].push()
|
repo.remotes[remote_name].push()
|
||||||
print('Done.')
|
print('Done.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue