aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-05-18 18:24:30 +0200
committerJunio C Hamano <gitster@pobox.com>2009-05-20 18:35:23 -0700
commit8dfb17e1fd7dec1d3a1978eb46743964c481cd08 (patch)
tree178eeac8f356e29adefc9292a4f89a8b5c21f36a /contrib
parentfd73ccf27956f24dc0db9acd4ff7d9dcd5e41bfb (diff)
downloadgit-8dfb17e1fd7dec1d3a1978eb46743964c481cd08.tar.gz
git-8dfb17e1fd7dec1d3a1978eb46743964c481cd08.tar.xz
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
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!"