Skip to content

Commit

Permalink
completion: use git rev-parse to detect bare repos
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Giuseppe Bilotta authored and Junio C Hamano committed May 21, 2009
1 parent fd73ccf commit 8dfb17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down

0 comments on commit 8dfb17e

Please sign in to comment.