Skip to content

Commit 8dfb17e

Browse files
Oblomovgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fd73ccf commit 8dfb17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ __git_ps1 ()
132132
local c
133133

134134
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
136136
c="BARE:"
137137
else
138138
b="GIT_DIR!"

0 commit comments

Comments
 (0)