mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
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:
parent
1526c52ed5
commit
c33d7e951a
4
gh.sh
4
gh.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue