better version of 'current_git_branch` function