From d4400b7bd926f8e0211da167cdc06e41fa593ebf Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Tue, 30 Sep 2014 20:14:47 +0800 Subject: [PATCH] Skip checking git remote if working tree is $HOME --- pure.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pure.zsh b/pure.zsh index ac18964..820094c 100644 --- a/pure.zsh +++ b/pure.zsh @@ -78,6 +78,8 @@ prompt_pure_precmd() { (( ${PURE_GIT_PULL:-1} )) && { # check if we're in a git repo command git rev-parse --is-inside-work-tree &>/dev/null && + # make sure working tree is not $HOME + [[ "$(command git rev-parse --show-toplevel)" != "$HOME" ]] && # check check if there is anything to pull command git fetch &>/dev/null && # check if there is an upstream configured for this branch