robbyrussell/oh-my-zsh — pull request #1263 by tedv (2012-07-31 17:37:07+00:00)
Title: Make git use sha when branch name is missing.

When git is in a headless state for some reason, none of the git prompt information shows up (except git_prompt_short_sha if you enabled it). This change uses the short sha tag of the current HEAD as a default if git symbolic-ref HEAD fails to get a branch name.