Much faster git checks, via dotfiles git prompt

https://github.com/paulirish/dotfiles/blob/19b37f9ca7d17aebλ1a2c74bcbac77023706b26/.bash_prompt#L81-L97
This commit is contained in:
Paul Irish 2015-01-24 13:24:40 -08:00
parent 1526c52ed5
commit c33d7e951a

4
gh.sh
View file

@ -4,7 +4,7 @@
#
# gh [remote] [branch]
git rev-parse 2>/dev/null
git rev-parse --is-inside-work-tree 2>/dev/null
if [[ $? != 0 ]]
then
@ -32,7 +32,7 @@ giturl=${giturl%\.git}
if [ -z "$2" ]
then
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
branch=`git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||'`
else
branch="$2"
fi