diff options
author | Mike Beattie <mike@ethernal.org> | 2018-05-27 20:51:07 +1200 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2018-05-27 20:51:07 +1200 |
commit | c6c21e68573f0db565347e698d3d9d492a9e3e5d (patch) | |
tree | c9ea8f8e39094fb4874c59f295e10ff8abfc13a6 | |
parent | 10e4019640664ae3e33b22fa7d91c68ba6d5f29f (diff) |
ZSH: only check git repo at SHLVL == 1
Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r-- | .zlogin | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -5,6 +5,7 @@ fi # check to see if git repository has been updated function () { + [ $SHLVL -ne 1 ] && return if command -v git >|/dev/null && git -C $HOME rev-parse >|/dev/null 2>&1 ; then local local_head="$(git -C $HOME show-ref --hash --heads master)" local origin_head="$(GIT_SSH_COMMAND="ssh -o BatchMode=yes -o ConnectTimeout=1" git -C $HOME ls-remote --heads origin master 2>|/dev/null | cut -f1)" |