From: Giuseppe Bilotta Date: Mon, 18 May 2009 16:24:30 +0000 (+0200) Subject: completion: use git rev-parse to detect bare repos X-Git-Tag: v1.6.3.2~27 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8dfb17e1fd7dec1d3a1978eb46743964c481cd08;p=git.git completion: use git rev-parse to detect bare repos Its check is more robust than a config check for core.bare Trivially-Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a0c579482..f44152c43 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -132,7 +132,7 @@ __git_ps1 () local c if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then - if [ "true" = "$(git config --bool core.bare 2>/dev/null)" ]; then + if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then c="BARE:" else b="GIT_DIR!"