summaryrefslogtreecommitdiff
path: root/updateGit.py
diff options
context:
space:
mode:
Diffstat (limited to 'updateGit.py')
-rwxr-xr-xupdateGit.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/updateGit.py b/updateGit.py
index 825ef45..de1bbc5 100755
--- a/updateGit.py
+++ b/updateGit.py
@@ -151,13 +151,14 @@ def updatePath(path):
for merged_branch in merged_branches:
if merged_branch in SAFEBRANCHES:
continue
- if merged_branch == cur_branch:
- continue
get_tracking_status = getGitStdout(path, [
'for-each-ref',
'--format=%(upstream:track,nobracket)',
'refs/heads/%s' % merged_branch
])
+ if merged_branch == cur_branch:
+ print("Checking out safe branch, as current is merged.")
+ getGitStdout(path, 'checkout ' + safe_branch)
if get_tracking_status.strip() == 'gone':
print('[%s]' % friendly_path, 'Removing branch by force, upstream is gone.')
print('[%s]' % friendly_path,