From 64d0803e1345c7124998cd0caa1865def8ad9e07 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 14 Sep 2012 22:53:14 +0900 Subject: [PATCH] use __gitdir for detecting git rep --- bashrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bashrc b/bashrc index c94184c..0de6e2c 100755 --- a/bashrc +++ b/bashrc @@ -572,9 +572,8 @@ GIT_PS1_SHOWUPSTREAM=t __my_ps1_git(){ local last=$? null type __git_ps1 || return $last - null git status || return $last # __gitdir seems to be able to be used - #test -n "`git status -s -uno`" && local star=\* # done by SHOWDIRTYSTATE - __git_ps1 "[GIT:$(__try_exec git config --get user.name):%s${star}]" + null __gitdir || return $last + __git_ps1 "[GIT:$(__try_exec git config --get user.name):%s]" return $last } __my_ps1_ipaddr(){