Merge pull request #2212 from awiddersheim/fix/detached_head_detection

Fix detached head detection in is_not_a_branch()
reviewable/pr18780/r1
Brian Coca 9 years ago
commit 84d42b2b31

@ -453,7 +453,7 @@ def is_local_branch(git_path, module, dest, branch):
def is_not_a_branch(git_path, module, dest):
branches = get_branches(git_path, module, dest)
for b in branches:
if b.startswith('* ') and 'no branch' in b:
if b.startswith('* ') and ('no branch' in b or 'detached from' in b):
return True
return False

Loading…
Cancel
Save