nojhan/liquidprompt — pull request #138 by jab416171 (2013-04-21 03:10:31+00:00)
Title: Only show the branch specifier if the current directory is part of a git repo

I couldn't come up with an alternate method of doing this. It works for empty directories (since you can't have a truly empty directory in git).
I personally use this because my home folder is a git repo.