diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-05-18 20:24:30 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-21 05:35:23 +0400 |
commit | 8dfb17e1fd7dec1d3a1978eb46743964c481cd08 (patch) | |
tree | 178eeac8f356e29adefc9292a4f89a8b5c21f36a /contrib | |
parent | fd73ccf27956f24dc0db9acd4ff7d9dcd5e41bfb (diff) |
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-x | contrib/completion/git-completion.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a0c5794828..f44152c433 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!" |