]> git.donarmstrong.com Git - zsh.git/commitdiff
do not print preprompt in git bare repos
authormartin f. krafft <madduck@madduck.net>
Fri, 5 Feb 2010 01:49:13 +0000 (02:49 +0100)
committermartin f. krafft <madduck@madduck.net>
Fri, 5 Feb 2010 01:49:13 +0000 (02:49 +0100)
.zsh/zshrc/60_vcsprompt

index dd8335a2fbf1528cb37e87a416bbd44cc25101a0..07ea29388fdeba3ac45de18284ec9aa8eab6ef94 100644 (file)
@@ -34,6 +34,8 @@ __git_get_branch()
 
 __git_print_preprompt()
 {
+  [ "$(git config --get core.bare)" = false ] || return
+
   local output
   output=(${(f):-"$(git diff --stat --relative 2>/dev/null)"})
   if [[ ${#output} -gt 1 ]]; then