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 <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Giuseppe Bilotta committed
May 18, 2009 at 18:24 UTC
8dfb17e1fd7dec1d3a1978eb46743964c481cd08
1 file changed
+1
-1
contrib/completion/git-completion.bash
+1
-1
@@ -132,7 +132,7 @@ __git_ps1 ()
132
local c
133
134
if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then
135
- if [ "true" = "$(git config --bool core.bare 2>/dev/null)" ]; then
135
+ if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then
136
c="BARE:"
137
else
138
b="GIT_DIR!"