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>
This commit is contained in:
parent
fd73ccf279
commit
8dfb17e1fd
@ -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!"
|
||||
|
Loading…
Reference in New Issue
Block a user