Merge pull request #2212 from awiddersheim/fix/detached_head_detection

Fix detached head detection in is_not_a_branch()
This commit is contained in:
Brian Coca 2015-10-12 18:42:57 -04:00
commit 84d42b2b31

View file

@ -453,7 +453,7 @@ def is_local_branch(git_path, module, dest, branch):
def is_not_a_branch(git_path, module, dest): def is_not_a_branch(git_path, module, dest):
branches = get_branches(git_path, module, dest) branches = get_branches(git_path, module, dest)
for b in branches: 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 True
return False return False