#NEWLINE# def _get_git_detached_branch( ) : #NEWLINE# #INDENT# p = subprocess . Popen ( [ 'git' , 'describe' , '--tags' , '--always' ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE , env = git_subprocess_env ( ) ) #NEWLINE# detached_ref = p . communicate ( ) [ 0 ] . decode ( 'utf-8' ) . rstrip ( '\n' ) #NEWLINE# if ( p . returncode == 0 ) : #NEWLINE# #INDENT# branch = '{} {}' . format ( RepoStats . symbols [ 'detached' ] , branch ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# branch = 'Big Bang' #NEWLINE# #UNINDENT# return branch