@lru_cache()
def get_git_branch():
 branch = _shell_command(['/usr/bin/git', 'symbolic-ref', '-q', 'HEAD']).strip()
 if (not branch):
  return None
 return '/'.join(branch.split('/')[2:])

@ lru_cache ( ) def get_git_branch ( ) : branch = _shell_command ( [ '/usr/bin/git' , 'symbolic-ref' , '-q' , 'HEAD' ] ) . strip ( ) if ( not branch ) : return None return '/' . join ( branch . split ( '/' ) [ 2 : ] )
returns the current git branch .